0% found this document useful (0 votes)
62 views4 pages

Step by Step Guide On How To Install and Use Containerd With Kubernetes On A Rancher K3 Distribution

This document provides a step-by-step guide to install and configure Containerd with Kubernetes on a Rancher K3s distribution. It first discusses the differences between Containerd and OCI, noting that Containerd is a higher-level runtime than Docker and uses RunC by default. The guide then outlines 11 steps to install K3s on server nodes and agent nodes, configure private registries, install Kubeconfig, and set up a Kubernetes cluster managed through Rancher.

Uploaded by

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

Step by Step Guide On How To Install and Use Containerd With Kubernetes On A Rancher K3 Distribution

This document provides a step-by-step guide to install and configure Containerd with Kubernetes on a Rancher K3s distribution. It first discusses the differences between Containerd and OCI, noting that Containerd is a higher-level runtime than Docker and uses RunC by default. The guide then outlines 11 steps to install K3s on server nodes and agent nodes, configure private registries, install Kubeconfig, and set up a Kubernetes cluster managed through Rancher.

Uploaded by

Rabia Aftab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Step by Step Guide on how to install and use Containerd with

Kubernetes on a rancher K3 distribution

OCI and Containered:


First we will take a look on the difference between containerd and OCI, then moving forward
towards the step by step guide. The Open container initiative is a structure used for expressing
the open industry standards in the formats of containers and runtimes. Containers are used as
standard unit for the software delivery. Dockers container runtime lacks in the technical and
business needs and due to this new runtime are developed. The OCI can run images produced in
the built in tools along with container image formats and runtimes.

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.

Figure 1 runtime comparison (source: better tomorrow to computerscience.com)

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.

8. Next, install K3 on each agent below:

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.

You might also like