Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Calico in Windows #5415

Closed
manuelbuil opened this issue Feb 9, 2024 · 1 comment
Closed

Improve Calico in Windows #5415

manuelbuil opened this issue Feb 9, 2024 · 1 comment
Assignees

Comments

@manuelbuil
Copy link
Contributor

manuelbuil commented Feb 9, 2024

Environmental Info:
RKE2 Version:

Node(s) CPU architecture, OS, and Version:

Cluster Configuration:

Describe the bug:

Calico was unable to create endpoints correctly because the config had the wrong name. It had "calico" instead of "Calico". As a consequence, pods were never starting.

Apart from this, it is a good practice to follow along what flannel does and check that the node exists in kube-api before starting Calico. This way, we can avoid potential problems.

Steps To Reproduce:

Expected behavior:

Pods start

Actual behavior:

Pods do not start

Additional context / logs:

@manuelbuil manuelbuil self-assigned this Feb 9, 2024
@manuelbuil manuelbuil changed the title Start Calico in Windows only when the node exists Fix Calico in Windows Feb 12, 2024
@manuelbuil manuelbuil changed the title Fix Calico in Windows Improve Calico in Windows Feb 12, 2024
@manuelbuil manuelbuil added this to the v1.29.2+rke2r1 milestone Feb 12, 2024
@ShylajaDevadiga
Copy link
Contributor

Validated using latest commit id on master branch 095d861

Environment Details

Infrastructure
Cloud EC2 instance

Using cni: calico

ubuntu@ip-172-31-11-57:~$ rke2 -v
rke2 version v1.29.2+dev.095d861f (095d861faf4d311bacbb7f554b444432ae1b1232)
go version go1.21.7 X:boringcrypto
ubuntu@ip-172-31-11-57:~$ cat /etc/rancher/rke2/config.yaml
write-kubeconfig-mode: "0644"
tls-san:
  - fake.fqdn.value
node-name: ip-172-31-11-57.us-east-2.compute.internal
cni: calico

node-external-ip: <REDACTED>
node-ip: 172.31.11.57
ubuntu@ip-172-31-11-57:~$ kubectl get nodes
NAME                                         STATUS   ROLES                       AGE    VERSION
ip-172-31-11-57.us-east-2.compute.internal   Ready    control-plane,etcd,master   106m   v1.29.2+rke2r1
ip-172-31-4-8.us-east-2.compute.internal     Ready    <none>                      103m   v1.29.2+rke2r1
ip-ac1f2610                                  Ready    <none>                      99m    v1.29.2

ubuntu@ip-172-31-11-57:~$ kubectl describe node ip-ac1f2610|grep Windows
  OS Image:                   Windows Server 2022 Datacenter

ubuntu@ip-172-31-11-57:~$ kubectl get pods -A
NAMESPACE         NAME                                                                  READY   STATUS      RESTARTS      AGE
calico-system     calico-kube-controllers-7675cbf978-wmjl6                              1/1     Running     0             105m
calico-system     calico-node-26sn7                                                     1/1     Running     0             105m
calico-system     calico-node-qkglw                                                     1/1     Running     0             104m
calico-system     calico-typha-6f44ddb7f8-jc5bz                                         1/1     Running     0             105m
calico-system     calico-typha-6f44ddb7f8-tk2pt                                         1/1     Running     0             99m
kube-system       cloud-controller-manager-ip-172-31-11-57.us-east-2.compute.internal   1/1     Running     1 (96m ago)   105m
kube-system       etcd-ip-172-31-11-57.us-east-2.compute.internal                       1/1     Running     0             105m
kube-system       helm-install-rke2-calico-crd-pl87c                                    0/1     Completed   0             106m
kube-system       helm-install-rke2-calico-pfsld                                        0/1     Completed   2             106m
kube-system       helm-install-rke2-coredns-m8t2s                                       0/1     Completed   0             106m
kube-system       helm-install-rke2-ingress-nginx-p8vxg                                 0/1     Completed   0             106m
kube-system       helm-install-rke2-metrics-server-z2qpm                                0/1     Completed   0             106m
kube-system       helm-install-rke2-snapshot-controller-crd-nwvb7                       0/1     Completed   0             106m
kube-system       helm-install-rke2-snapshot-controller-lxq94                           0/1     Completed   0             106m
kube-system       helm-install-rke2-snapshot-validation-webhook-xnxpv                   0/1     Completed   0             106m
kube-system       kube-apiserver-ip-172-31-11-57.us-east-2.compute.internal             1/1     Running     0             105m
kube-system       kube-controller-manager-ip-172-31-11-57.us-east-2.compute.internal    1/1     Running     1 (96m ago)   105m
kube-system       kube-proxy-ip-172-31-11-57.us-east-2.compute.internal                 1/1     Running     0             105m
kube-system       kube-proxy-ip-172-31-4-8.us-east-2.compute.internal                   1/1     Running     0             104m
kube-system       kube-scheduler-ip-172-31-11-57.us-east-2.compute.internal             1/1     Running     1 (96m ago)   105m
kube-system       rke2-coredns-784786f455-dbvwx                                         1/1     Running     0             103m
kube-system       rke2-coredns-784786f455-lbmgb                                         1/1     Running     0             105m
kube-system       rke2-coredns-autoscaler-f559b6d84-dtvkg                               1/1     Running     0             105m
kube-system       rke2-ingress-nginx-controller-wxv4l                                   1/1     Running     0             101m
kube-system       rke2-ingress-nginx-controller-x9v8h                                   1/1     Running     0             104m
kube-system       rke2-metrics-server-544c8c66fc-8zrdb                                  1/1     Running     0             104m
kube-system       rke2-snapshot-controller-59cc9cd8f4-zm6gh                             1/1     Running     0             104m
kube-system       rke2-snapshot-validation-webhook-54c5989b65-4xqcl                     1/1     Running     0             104m
tigera-operator   tigera-operator-69d9db6f79-tfvwq                                      1/1     Running     1 (96m ago)   105m
ubuntu@ip-172-31-11-57:~$ 

Using cni: flannel

ubuntu@ip-172-31-1-179:~$ rke2 -v
rke2 version v1.29.2+dev.095d861f (095d861faf4d311bacbb7f554b444432ae1b1232)
go version go1.21.7 X:boringcrypto

ubuntu@ip-172-31-1-179:~$ cat /etc/rancher/rke2/config.yaml
write-kubeconfig-mode: "0644"
tls-san:
  - fake.fqdn.value
node-name: ip-172-31-1-179.us-east-2.compute.internal
cni: flannel

node-external-ip: <REDACTED>
node-ip: 172.31.1.179

ubuntu@ip-172-31-1-179:~$ kubectl get nodes
NAME                                         STATUS   ROLES                       AGE    VERSION
ip-172-31-1-179.us-east-2.compute.internal   Ready    control-plane,etcd,master   109m   v1.29.2+rke2r1
ip-172-31-10-29.us-east-2.compute.internal   Ready    <none>                      107m   v1.29.2+rke2r1
ip-ac1f2610                                  Ready    <none>                      103m   v1.29.2

ubuntu@ip-172-31-1-179:~$ kubectl describe node ip-ac1f2610 |grep Windows
  OS Image:                   Windows Server 2022 Datacenter

ubuntu@ip-172-31-1-179:~$ kubectl get pods -A
NAMESPACE     NAME                                                                  READY   STATUS      RESTARTS   AGE
kube-system   cloud-controller-manager-ip-172-31-1-179.us-east-2.compute.internal   1/1     Running     0          109m
kube-system   etcd-ip-172-31-1-179.us-east-2.compute.internal                       1/1     Running     0          109m
kube-system   helm-install-rke2-coredns-krd7q                                       0/1     Completed   0          109m
kube-system   helm-install-rke2-flannel-g45zh                                       0/1     Completed   0          109m
kube-system   helm-install-rke2-ingress-nginx-bm9bv                                 0/1     Completed   0          109m
kube-system   helm-install-rke2-metrics-server-qhxz6                                0/1     Completed   0          109m
kube-system   helm-install-rke2-snapshot-controller-crd-x9z56                       0/1     Completed   0          109m
kube-system   helm-install-rke2-snapshot-controller-hkw52                           0/1     Completed   0          109m
kube-system   helm-install-rke2-snapshot-validation-webhook-k9ljt                   0/1     Completed   0          109m
kube-system   kube-apiserver-ip-172-31-1-179.us-east-2.compute.internal             1/1     Running     0          109m
kube-system   kube-controller-manager-ip-172-31-1-179.us-east-2.compute.internal    1/1     Running     0          109m
kube-system   kube-flannel-ds-ksxlh                                                 1/1     Running     0          107m
kube-system   kube-flannel-ds-lm7fm                                                 1/1     Running     0          109m
kube-system   kube-proxy-ip-172-31-1-179.us-east-2.compute.internal                 1/1     Running     0          108m
kube-system   kube-proxy-ip-172-31-10-29.us-east-2.compute.internal                 1/1     Running     0          107m
kube-system   kube-scheduler-ip-172-31-1-179.us-east-2.compute.internal             1/1     Running     0          109m
kube-system   rke2-coredns-784786f455-px4xq                                         1/1     Running     0          109m
kube-system   rke2-coredns-784786f455-xb5zg                                         1/1     Running     0          107m
kube-system   rke2-coredns-autoscaler-f559b6d84-phn9g                               1/1     Running     0          109m
kube-system   rke2-ingress-nginx-controller-5spxr                                   1/1     Running     0          106m
kube-system   rke2-ingress-nginx-controller-tq9jk                                   1/1     Running     0          108m
kube-system   rke2-metrics-server-544c8c66fc-mbqlm                                  1/1     Running     0          108m
kube-system   rke2-snapshot-controller-59cc9cd8f4-hk974                             1/1     Running     0          108m
kube-system   rke2-snapshot-validation-webhook-54c5989b65-hpb2j                     1/1     Running     0          108m
ubuntu@ip-172-31-1-179:~$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants