Why does the IP address in the output of kubectl not match the IP address that is visible in the container?
root@container-node:~/packages/tmp# kubectl get service/athens-proxy-0-1595600369
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
athens-proxy-0-1595600369 ClusterIP 10.108.96.34 <none> 80/TCP 19m
root@container-node:~/packages/tmp# kubectl exec service/athens-proxy-0-1595600369 -- ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0@if676: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether 42:ac:9b:20:27:ea brd ff:ff:ff:ff:ff:ff
inet 10.88.1.173/16 brd 10.88.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::40ac:9bff:fe20:27ea/64 scope link
valid_lft forever preferred_lft forever
root@container-node:~/packages/tmp# pod=$(crictl pods --name athens-proxy-0-1595600369-6976f57484-wgblv --quiet)
root@container-node:~/packages/tmp# container=$(crictl ps --pod $pod --quiet)
root@container-node:~/packages/tmp# crictl exec $container ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0@if676: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether 42:ac:9b:20:27:ea brd ff:ff:ff:ff:ff:ff
inet 10.88.1.173/16 brd 10.88.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::40ac:9bff:fe20:27ea/64 scope link
valid_lft forever preferred_lft forever
root@container-node:~/packages/tmp#
Why does the IP address in the output of
kubectl
not match the IP address that is visible in the container?