问题描述
我已经安装了kubeadm
并创建了服务和pod:
I have installed kubeadm
and created service and pod:
packet@test:~$ kubectl get pod
NAME READY STATUS RESTARTS AGE
udp-server-deployment-6f87f5c9-466ft 1/1 Running 0 5m
udp-server-deployment-6f87f5c9-5j9rt 1/1 Running 0 5m
udp-server-deployment-6f87f5c9-g9wrr 1/1 Running 0 5m
udp-server-deployment-6f87f5c9-ntbkc 1/1 Running 0 5m
udp-server-deployment-6f87f5c9-xlbjq 1/1 Running 0 5m
packet@test:~$ kubectl get service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 1h
udp-server-service NodePort 10.102.67.0 <none> 10001:30001/UDP 6m
但是我仍然无法访问udp-server pod:
but still I am not able to access udp-server pod:
packet@test:~$ curl http://192.168.43.161:30001
curl: (7) Failed to connect to 192.168.43.161 port 30001: Connection refused
在调试时我可以看到kube-proxy
正在运行,但是IPVS中没有条目:
while debugging i could see kube-proxy
is running but there is no entry in IPVS:
root@test:~# ps auxw | grep kube-proxy
root 4050 0.5 0.7 44340 29952 ? Ssl 14:33 0:25 /usr/local/bin/kube-proxy --config=/var/lib/kube-proxy/config.conf
root 6094 0.0 0.0 14224 968 pts/1 S+ 15:48 0:00 grep --color=auto kube-proxy
root@test:~# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
似乎ipvsadm中没有任何条目,导致连接超时.
Seems to be there is no entry in ipvsadm causing connection time out.
Ranjith,
推荐答案
最初,我是使用虚拟框(在窗口上运行)创建VM(Linux VM)的,在那里发现了这种类型的问题.
initially I have created VM(Linux VM) using virtual box(running on window),where I found this type of issue.
现在我已经使用虚拟管理器(在Linux上运行)创建了VM(Linux VM),在此设置中没有问题,一切正常.
Now i have created VM(Linux VM) using virtual manager(running on Linux),in this set up there is no issue and every thing works fine.
如果有人告诉您虚拟盒子有任何限制,那将是很棒的事情
It would be great if any one tell is there any restriction from virtual box?
这篇关于ipvsadm在kubeadm集群中不显示任何条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!