![](/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.