0% found this document useful (0 votes)
29 views2 pages

Install Docker for K8s on Ubuntu

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Install Docker for K8s on Ubuntu

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

These steps can be used to install Docker instead of

cri-o. Only one engine should be installed. Either


install Docker, or crio, but not both.

These steps will take you from the wget command


up to the start of the "Configure the Control Plane"
section, about five steps. After using this file,
skip to that section, the first command of which
installs bash-completion and vim.

cp$ is the control plane prompt, worker$ is the


worker node prompt in the commands below. Don't
type the prompt, just the commands that follow.

*****ON CONTROL PLANE NODE****


Find the script:
cp$ find $HOME -name k8scp-docker.sh

Copy the script to your current directory:


cp$ cp <path_from_output_above> $HOME

Install Docker. If asked, answer yes to restart


services during upgrades and option 2 to use local
sshd config.

Read the last lines of output to find the IP and alias


in the /etc/hosts file:
cp$ bash k8scp-docker.sh | tee cp.out

If you don't see the output in the output


check the /etc/hosts file for the IP and alias. You
will need the line to add to the worker:
cp$ grep k8scp /etc/hosts

Move to the worker and install Docker on the worker.


Begin by finding the script:
worker$ find $HOME -name k8sSecond-docker.sh

Copy the script to your home directory:


worker$ cp <path_from_output_above> $HOME

Run the script, again answer yes to upgrade restart and


option 2 to keep local sshd version installed:
worker$ bash k8sSecond-docker.sh

Edit the /etc/hosts file. Use the alias from the


control plane node. Use YOUR IP, what follows is
and example only:
worker$ echo "10.<YOUR-OUTPUT> k8scp" | sudo tee -a /etc/hosts

Copy over the multi-line kubeadm join statement from the control
plane node. You can check the $HOME/cp.out file on the
control plane using grep -A3 'worker nodes' cp.out if it is no
longer in the terminal history. Remember to prepend sudo to
the kubeadm command:
worker$ sudo kubeadm join k8scp:6443 --token.....

Return to the control plane check that both nodes


are in the cluster. :
cp$ kubectl get node

If you see both nodes return to the course. Remember


that podman and docker commands act the same. Where you
may see crictl ps, use docker ps.

You might also like