This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Kubernetes Debian 10 ===== Configure **/etc/hosts**: <code> 192.168.122.136 k8smaster 192.168.122.98 k8sworker1 192.168.122.27 k8sworker2 </code> On three nodes: <code> apt-get update apt-get upgrade apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable" apt-get update apt-get install docker-ce docker-ce-cli containerd.io curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - cat <<EOF | tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-xenial main EOF apt-get update apt-get install -y kubelet kubeadm kubectl cat > /etc/docker/daemon.json <<EOF { "exec-opts": ["native.cgroupdriver=systemd"], "log-driver": "json-file", "log-opts": { "max-size": "100m" }, "storage-driver": "overlay2" } EOF mkdir -p /etc/systemd/system/docker.service.d systemctl daemon-reload systemctl restart docker swapoff -a sed -e '/swap/ s/^#*/#/' -i /etc/fstab </code> On master: <code> kubeadm init --pod-network-cidr=10.244.10.0/16 --apiserver-advertise-address=192.168.122.136 su - emonge mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml </code> On nodes: <code> kubeadm join 192.168.122.136:6443 --token qegj29.yjrkqi01jwrji3m0 \ --discovery-token-ca-cert-hash sha256:119dd2951ba386bbaae80af67bf52d1db559bdb937a96225522e3ea4a7074d5d </code> Check: <code> kubectl get pods --all-namespaces kubectl get nodes </code> ==== References ==== * https://docs.docker.com/install/linux/docker-ce/debian/ * https://www.howtoforge.com/tutorial/how-to-install-kubernetes-on-ubuntu/ * https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/ * https://kubernetes.io/docs/setup/production-environment/container-runtimes/