Skip to content

Smoke test the cluster

from our git repo directory that we checked out in create gcloud earlier

Terminal window
source .env
gcloud compute ssh k3s-vm-1 --zone=us-central1-a --project=$PROJECT_NAME

We should be shelled into our vm.

Terminal window
user@k3s-vm-1:~$ k version
Client Version: v1.32.8+k3s1
Kustomize Version: v5.5.0
Server Version: v1.32.8+k3s1

Kubectl is giving us a version

Terminal window
user@k3s-vm-1:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
k3s-vm-1 Ready control-plane,etcd,master 7m41s v1.32.8+k3s1

kubectl which is also aliased to k ( we can use either ) is telling us we have a single node k3s node.

Terminal window
k get events -A
....
kube-system 8m53s Normal ApplyingManifest addon/runtimes Applying manifest at "/var/lib/rancher/k3s/server/manifests/runtimes.yaml"
kube-system 8m53s Normal AppliedManifest addon/runtimes Applied manifest at "/var/lib/rancher/k3s/server/manifests/runtimes.yaml"
kube-system 8m52s Normal DeletingManifest addon/traefik Deleting manifest at "/var/lib/rancher/k3s/server/manifests/traefik.yaml"

There should be a bunch of events - the cluster just started up, and no alarming warnings or errors are present.

We should have pods running:

Terminal window
user@k3s-vm-1:~$ k get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-64fd4b4794-gt5mp 1/1 Running 0 11m
kube-system local-path-provisioner-774c6665dc-h5xws 1/1 Running 0 11m
kube-system metrics-server-7bfffcd44-tfwnw 1/1 Running 0 11m

Not many, this is true but k3s is lightweight. This is good.

Ok, so we have a functioning single node k3s, next we can install an application that can use our Domain name we configured earlier, using forgejo, a code forge application, much like github, gitlab but self-hosted and efficient.