- Getting Started with Kubernetes
- Jonathan Baier Jesse White
- 203字
- 2021-06-10 19:47:02
Installing Kubernetes components (kubelet and kubeadm)
Next, we will need to SSH into all four of the instances and install the Kubernetes components.
As the root user, perform the following steps on all four instances:
- Update the packages and install the apt-transport-https package so that we can download from sources that use HTTPS:
$ apt-get update
$ apt-get install -y apt-transport-https
- Install the Google Cloud public key:
$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg |
apt-key add -
- Next, let's set up the repository:
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl docker.io kubernetes-cni
You'll need to make sure that the cgroup driver used by the kubelet on the master node is configured correctly to work with Docker. Make sure you're on the master node, then run the following:
docker info | grep -i cgroup
cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
If these items don't match, you're going to need to change the kubelet configuration to match the Docker driver. Running sed -i "s/cgroup-driver=systemd/cgroup-driver=cgroupfs/g" /etc/systemd/system/kubelet.service.d/10-kubeadm.conf should fix the settings, or you can manually open the systemd file and add the correct flag to the appropriate environment. After that's complete, restart the service:
$ systemctl daemon-reload
$ systemctl restart kubelet
- 平面設(shè)計初步
- Practical Ansible 2
- Photoshop CS3特效處理融會貫通
- 四向穿梭式自動化密集倉儲系統(tǒng)的設(shè)計與控制
- 具比例時滯遞歸神經(jīng)網(wǎng)絡(luò)的穩(wěn)定性及其仿真與應(yīng)用
- DevOps Bootcamp
- 從零開始學(xué)PHP
- INSTANT Munin Plugin Starter
- 中文版AutoCAD 2013高手速成
- 智能制造系統(tǒng)及關(guān)鍵使能技術(shù)
- 常用傳感器技術(shù)及應(yīng)用(第2版)
- 計算機組裝與維修實訓(xùn)
- PyTorch深度學(xué)習(xí)
- CPLD/FPGA技術(shù)應(yīng)用
- SQL Server 2019 Administrator's Guide