Chapter 2 – Installing and Configuring Kubernetes Clusters
You have two virtual machines: master-0
and worker-0
. Please complete the following mock scenarios.
Scenario 1
Install the latest version of kubeadm
, then create a basic kubeadm cluster on the master-0
node, and get the node information.
- Update the
apt package index
, add a Google Cloud public signing key, and set up the Kubernetes apt repository by running the following instructions:sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
- Start by updating the apt package index, then install
kubelet
andkubeadm
:sudo apt-get update sudo apt-get install -y kubelet kubeadm...