kind: networking issue - dns stops working when used calico cni
What happened:
networking issue - when deploying calico
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: true
podSubnet: "192.168.0.0/16"
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
kind create cluster --config=kind-configs/cluster-calico.yaml
kubectl apply -f https://docs.projectcalico.org/v3.11/manifests/calico.yaml
k run nginx --image=bjethwan/nginx --replicas=2 --expose=true --port=80
kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
service/nginx created
deployment.apps/nginx created
$ k run busybox --image=busybox --rm -it --restart=Never
If you don't see a command prompt, try pressing enter.
/ #
/ # wget -q google.com -O -
wget: bad address 'google.com'
/ # wget -q nginx -O -
<!DOCTYPE html>
<html>
...
<h1>Welcome to nginx!</h1>
</html>
/ # exit
pod "busybox" deleted
What you expected to happen: I didn’t apply any network policies. So I expected dns to work fine for external names.
exact same setup and aws worked fine (used kops to create the cluster using networking=calico)
Environment:
$ kind version
kind v0.6.1 go1.13.4 darwin/amd64
$ kubectl version --short
Client Version: v1.14.1
Server Version: v1.16.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (6 by maintainers)
Kind and kubeadm defaults the podSubnet, you should check calico the configuration options to configure the right parameters, otherwise the cluster and calico will run out of sync and I don’t know if this can be the cause of your issues… there are many more users and also Calico devs using kind, I mean, it seems to me that this has to be something related to the specific environment or a misconfiguration somewhere