How to setup k3s cluster and test containerd runtime ( on GCP )

Paul Pan
2021-09-08 22:58

Subject 

How to setup k3s cluster and test containerd runtime ( on GCP )

Description

This article teaches you how to set up a k3s cluster on gcp. K3s is a lightweight version of k8s and uses containerd as CRI runtime.

containerd is the new standard container runtime for Kubernetes. It supports Docker images as is. So nothing need to be changed, but if you ever need to tested the runtime, you can easily do it on GCP.

Resolution

1.  You need to create two vm on gcp. On master vm, you need to configure network tag to allow connection on port 6443.
2.  SSH on to the master vm   
3.  $ curl -sfL https://get.k3s.io | sh –
4.  Get token from $ cat /var/lib/rancher/k3s/server/node-token
5.  SSH to worker node vm 
6.  $ curl -sfL https://get.k3s.io | K3S_URL=https://<Master_node_ip>:6443 K3S_TOKEN=<token from step 4>

Notes:
You can test containered pull with
$ crictl –debug pull –creds username:password jfrog-docker-enterprise-docker.bintray.io/distribution-installer:0.1
.0-m003