Smoke test the cluster
Smoke test the cluster
Section titled “Smoke test the cluster”from our git repo directory that we checked out in create gcloud earlier
source .envgcloud compute ssh k3s-vm-1 --zone=us-central1-a --project=$PROJECT_NAME
We should be shelled into our vm.
user@k3s-vm-1:~$ k versionClient Version: v1.32.8+k3s1Kustomize Version: v5.5.0Server Version: v1.32.8+k3s1
Kubectl is giving us a version
user@k3s-vm-1:~$ kubectl get nodesNAME STATUS ROLES AGE VERSIONk3s-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.
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:
user@k3s-vm-1:~$ k get pods -ANAMESPACE NAME READY STATUS RESTARTS AGEkube-system coredns-64fd4b4794-gt5mp 1/1 Running 0 11mkube-system local-path-provisioner-774c6665dc-h5xws 1/1 Running 0 11mkube-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.