![](/img/trans.png)
[英]How to connect to k8s api server within a pod using k8s java client
[英]How to connect a pod to internet ? [K8S]
当我运行 nginx 吊舱然后尝试 curl www.google.com失败。
$ kubectl exec -it nginx -- sh
# curl http://google.com
'curl: (6) Could not resolve host: google.com
我该如何解决这个问题?
cni 配置:
"cniVersion": "0.3.1", "name": "crio", "type": "bridge", "bridge": "cni0", "isGateway": true, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "host-local", "routes": [ { "dst": "0.0.0.0/0" }, { "dst": "1100:200::1/24" } ], "ranges": [ [{ "subnet": "10.85.0.0/16" }], [{ "subnet": "1100:200::/24" }] ] } }
When I run nginx container with podman then try to execute a curl within the container: $ curl http://google.com (timeout)
尝试这个:
kubeadm reset
删除集群/opt/bni/bin/weave-*
。kubeadm init
创建新集群之前重新启动机器。看起来像以下问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.