This page looks best with JavaScript enabled

Summary of Kubernetes 1.6.0 Installation Problems

 ·  ☕ 2 min read

1. CNI Problems

Error log

1
2
journalctl -u kubelet
...Unable to update cni config: No networks found in /etc/cni/net.d

Because no CNI is installed, you need to remove --network-plugin=cni from the parameters in /var/lib/kubelet/kubeadm-flags.env.

1
2
cat /var/lib/kubelet/kubeadm-flags.env
KUBELET_KUBEADM_ARGS="--cgroup-driver=systemd  --pod-infra-container-image=k8s.gcr.io/pause:3.1"

2. Node NotReady

There can be many reasons for a node being NotReady. It is usually caused by a network or container configuration error, and each possibility needs to be checked one by one.

Here the installation steps from the Using Kubeadm to install the Kubernetes cluster
document were used.

In the end, the cause turned out to be a mismatch between Kubelet’s cgroupDriver and Docker, which led to NotReady.

Kubelet’s configuration file is at /var/lib/kubelet/config.yaml. Modify it:

1
cgroupDriver: systemd

It just needs to match Docker’s configuration file /etc/docker/daemon.json:

1
2
3
{
  "exec-opts": ["native.cgroupdriver=systemd"]
}

3. Helm init cannot find the requested resource

The specific error message:

1
2
3
helm init --service-account tiller
...
Error: error installing: the server could not find the requested resource

Cause:

helm v2.14.3 is not compatible with the apiVersion of Kubernetes 1.16.0.

Solution:

1
helm init --output yaml > tiller.yaml

Update two things in tiller.yaml:

  • the apiVersion version
  • add a selector
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
apiVersion: apps/v1
kind: Deployment
...
spec:
  replicas: 1
  strategy: {}
  selector:
    matchLabels:
      app: helm
      name: tiller

Create tiller

1
kubectl create -f tiller.yaml

Reference link, Github Issues .


WeChat Official Account
WRITTEN BY
WeChat Official Account