Welcome to the Linux Foundation Forum!

Lab 3.5 Who is providing IPs

When reading step 18 it seems to state calico is providing the cluster IP and pod ips are being provided by kubelet/kube proxy

Step18
"Verify the service configuration. First look at the service, then the endpoint information. Note the ClusterIP is not the
current endpoint. Calico provides the ClusterIP. The Endpoint is provided by kubelet and kube-proxy. Take note
of the current endpoint IP. In the example below it is 192.168.1.5:80. We will use this information in a few steps"

However based on what i see, it seems to be be that calico is control of assigning ip of pods

When i look at the nodes, i will see that the subnets being defined are actually different than what is being assigned to pods. You will also see that the pods running have annotations for calico.

[email protected]:~$ kubectl describe nodes | grep 192.168
projectcalico.org/IPv4IPIPTunnelAddr: 192.168.219.64
PodCIDR: 192.168.0.0/24
PodCIDRs: 192.168.0.0/24
projectcalico.org/IPv4IPIPTunnelAddr: 192.168.171.64
PodCIDR: 192.168.1.0/24
PodCIDRs: 192.168.1.0/24

[email protected]:~$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-d46f5678b-rbzrr 1/1 Running 0 9m1s 192.168.219.68 master
nginx-d46f5678b-w7k52 1/1 Running 0 31m 192.168.171.67 worker
nginx-d46f5678b-xkmmj 1/1 Running 0 9m1s 192.168.171.68 worker
[email protected]:~$

[email protected]:~$ kubectl describe pods | egrep "node|192"
Annotations: cni.projectcalico.org/podIP: 192.168.219.69/32
cni.projectcalico.org/podIPs: 192.168.219.69/32
IP: 192.168.219.69
IP: 192.168.219.69
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Annotations: cni.projectcalico.org/podIP: 192.168.171.67/32
cni.projectcalico.org/podIPs: 192.168.171.67/32
IP: 192.168.171.67
IP: 192.168.171.67
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Annotations: cni.projectcalico.org/podIP: 192.168.171.68/32
cni.projectcalico.org/podIPs: 192.168.171.68/32
IP: 192.168.171.68
IP: 192.168.171.68
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s

Looking for clarification to confirm that Calico is providing pods ip and cluster ips.

Comments

  • Its seem that I probably mistook the meaning behind the step18 . But interested in finding out where the pod subnets on each node is being defined and who is allocating the ip

  • chrispokornichrispokorni Posts: 1,065

    Hi @jason.sones.cloud,

    Examining pod annotations and listing running pods in the cluster with the -o wide output flag reveal the pod IP addresses assigned by and managed by the network plugin from the default pod network 192.168.0.0/16.

    Regards,
    -Chris

  • serewiczserewicz Posts: 920

    Hello,

    The network plugin, Calico, works with the kubeadm init default values, unless other values are passed during cluster initialization. As a result the IP pools are a mixture of two places, configured when the cluster is initialized.

    Regards,

  • Thanks for Info!

Sign In or Register to comment.