This is an old revision of the document!
Add the Repository,install “kubelet” + “kubeadm” + “kubectl” and set the updates on hold
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \ echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \ sudo apt-get update -q && \ sudo apt-get install -qy kubelet kubeadm kubectl apt-mark hold kubelet kubeadm kubectl <code> ===== Configuration ===== ==== master ==== Pull images used by kubeadm <code> kubeadm config images pull
Set up the ip configuration, the “apiserver-advertise-address” has to be your management ip
kubeadm init --apiserver-advertise-address=10.0.0.1 --pod-network-cidr=192.168.0.0/16 kubeadm init --pod-network-cidr=192.168.0.0/16
You may run into the following warnings and errors
[init] Using Kubernetes version: v1.16.2 [preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/ [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.4. Latest validated version: 18.09 error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR Swap]: running with swap on is not supported. Please disable swap [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...` To see the stack trace of this error execute with --v=5 or higher
Command | Function |
---|---|
Placeholder | Placeholder |
Reason:
Fix:
Please mind, that you only have to do that if the cgroup driver of your CRI is not cgroupfs, because that is the default value in the kubelet already.
ABER
[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/