Hi, this is a general question about services ip type: clusterip, nodeport etc…
I was wondering, how to know what kind of ip it is? how to see it in linux kernel or with linux commands?
I am using microk8s, i am using default clusterip on services and i wanted to identify them in linux kernel:
on linux i can see a calico net interface, used for pods:
4: vxlan.calico: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default
link/ether 66:e8:e7:fa:d1:f3 brd ff:ff:ff:ff:ff:ff
inet 10.1.128.192/32 scope global vxlan.calico
valid_lft forever preferred_lft forever
inet6 fe80::64e8:e7ff:fefa:d1f3/64 scope link
kube-system pod/metrics-server-6b6844c455-jkbgs 1/1 Running 0 2d15h 10.1.128.198 microk8s
kube-system pod/calico-kube-controllers-86c46c6b67-mg72x 1/1 Running 0 3d10h 10.1.128.193 microk8s
ok for that
and i can see on services clusterip/nodeport with ips not related to net interfaces. i suppose it il virtual ip but of what kind?
kube-system service/kube-dns ClusterIP 10.152.183.10 53/UDP,53/TCP,9153/TCP 3d10h k8s-app=kube-dns
kube-system service/metrics-server ClusterIP 10.152.183.199 443/TCP 2d15h k8s-app=metrics-server
iptables-save -t nat is empty and filter table show only access right obout a network which is unknown:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -s 10.1.0.0/16 -m comment --comment “generated for MicroK8s pods” -j ACCEPT
-A FORWARD -d 10.1.0.0/16 -m comment --comment “generated for MicroK8s pods” -j ACCEPT
COMMIT
Completed on Mon Nov 21 11:09:17 2022
Warning: iptables-legacy tables present, use iptables-legacy-save to see them
k8sadm@microk8s:~$ sudo iptables-save -t nat
Generated by iptables-save v1.8.7 on Mon Nov 21 11:09:26 2022
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
ipvs show nothing:
k8sadm@microk8s:~$ sudo ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
→ RemoteAddress:Port Forward Weight ActiveConn InActConn
So how to identify these ips?
Regards,