0
votes

I am new to Kubernetes. I have created a Kubernetes cluster with one Master node and 2 worker nodes. I have installer helm for the deployment of apps. I am getting the following error while starting the tiller pod

tiller-deploy-5b4685ffbf-znbdc 0/1 ContainerCreating 0 23h

After describing the pod I got the following result

[root@master-node flannel]# kubectl --namespace kube-system describe pod tiller-deploy-5b4685ffbf-znbdc

Events: Type Reason Age From Message

Warning FailedCreatePodSandBox 10m (x34020 over 22h) kubelet, worker-node1 (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "cdda0a8ae9200668a2256e8c7b41904dce604f73f0282b0443d972f5e2846059" network for pod "tiller-deploy-5b4685ffbf-znbdc": networkPlugin cni failed to set up pod "tiller-deploy-5b4685ffbf-znbdc_kube-system" network: open /run/flannel/subnet.env: no such file or directory Normal SandboxChanged 25s (x34556 over 22h) kubelet, worker-node1 Pod sandbox changed, it will be killed and re-created.

Any hint of how can I get away with this error.

1
how did you setup the cluster? kubeadm? can you provide the output of kubectl get pods -n kube-systemArghya Sadhu
Have you tried to deploy a "hello world" container? BTW helm 3.x doesn't require tiller anymore.JGK

1 Answers

1
votes

You need to setup a CNI plugin such as Flannel. Verify if all the pods in kube-system namespace are running.

To apply flannel in you cluster run the following command:

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml

For flannel to work correctly pod-network-cidr should be 10.244.0.0/16 or if you have a different CIDR, you can customize flannel manifest (kube-flannel.yml) according to your needs.

Example:

  net-conf.json: |
    {
      "Network": "10.10.0.0/16",
      "Backend": {
        "Type": "vxlan"
      }