Step by Step Guide On How To Install and Use Containerd With Kubernetes On A Rancher K3 Distribution
Step by Step Guide On How To Install and Use Containerd With Kubernetes On A Rancher K3 Distribution
However, Containerd is high-level runtime of Docker, and can be developed. It uses runC by
default. It provides the core functions of CRI. Moreover it has some designed plugins which
integrates the low level runtimes.
GUIDE:
In this article we are going to look at a way of provision of Kubernets cluster using a tool called
K3s from ranchers. For ranchers before v2.4, the rancher’s setup should be installed on ranchers
kubernets engine that is the cluster. It’s a certified kubernets distribution which usually run on
the containers consisting of Dockers. In the rancher v2.4 this management server can be installed
on the clusters of RKE or K3s clusters of kubernets.
In this guide we have assumed that the nodes are already created in the environment and are
having a secure or private registry of Dockers in the server of base station.
STEPS TO FOLLOW
1. First and foremost, you have to access the images tar file for the system architecture for
the version of K3s you want run.
2. Now the tar file must be placed inside the directory of “images” prior to start K3s on
every node. Below is an example:
3. After that, you have to create a registry file. The registry file can be named as
registries.yaml . this is created in order to know the important details which are needed to
connect to other registries which are private. Below code snippet shows the
registries.yaml file which is shown before the necessary information is given.
Here only the protected and secure registries are used with K3s.
4. Now find out the suitable version of kubernets which can be used with ranchers and
install ranchers. For the specified K3s version you can use the environment variable such
as: INSTALL_K3S_VERSION. This must be done when the installation script of K3s is
running.
5. Now get the K3s binary from the support center and match your version to get the images
tar airgap setups.
6. After this, also obtain the K3s scripts for installation from our GitLab repository:
https://gitlab.com/discord21/dockers-kubernets-guide/-/snippets/2121605
7. In the next step, on each node, start placing /usr/local/bin . Don’t forget to name it as
install.sh and now install K3s on each node on the server.
9. While replacing ‘myserver’ with IP or any DNS care must be taken. The ‘mynodetoken’
must be replaced with the node-tokens present in the server. The nose tokens in the
servers are available at: /var/lib/rancher/k3s/server/node-token.
10. After installing K3s on the server nodes of ranchers, a file named ‘kubeconfig’ is created
at the node in the /etc/rancher/k3s/k3s.yaml. This created file consists of information to
access the clusters or distributed kubernets. This file must be saved at a protected place.
11. For using the file named as ‘kubeconfig’, firstly install the kubernets Cmd tool. Then
copy the yaml file and save it in the directory of the system you are using. In the
kuberconfig file, the directive of server is defined in the localhost. The server at the DNS
must be configured and referred to port 6443. The rancher server is configured at a
certain port 443. Below you can see:
Conclusion:
Now the K3s cluster is ready to use and managed by using kubect1.