Installing and configuring the vSphere CSI Driver in K3S

Environment: vSphere 7. VM Hardware Version 19 Two VMs running Debian 11.9 SSH Enabled Root login via SSH enabled. Not best practise, but as this is a lab, I did not want to troubleshoot permission related issues. Edit /etc/ssh/sshd_config Add "PermitRootLogin: yes" Restart SSHD - systemctl restart sshd Install govc root@control1:~# export GOVC_INSECURE=1 root@control1:~# export GOVC_URL='https://administrator@vsphere.local:<PASSWORD>@vc802.gs.labs' root@control1:~# curl -L -o - "https://github.com/vmware/govmomi/releases/latest/download/govc_$(uname -s)_$(uname -m).tar.gz" | tar -C /usr/local/bin -xvzf - govc Enable UUID # List existing VMs using govc ls /Datacenter/vm/VMName root@control1:~# govc vm....

February 16, 2024 · 8 min · Jahnin Rajamoni

Failed to Call Webhook when deploying Metallb in K3s

After installing metallb using helm, I hit the below error when applying the IP Adress Pool. Error from server (InternalError): error when creating "ip-pool.yaml": Internal error occurred: failed calling webhook "ipaddresspoolvalidationwebhook.metallb.io": failed to call webhook: Post "https://metallb-webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s": context deadline exceeded Error from server (InternalError): error when creating "ip-pool.yaml": Internal error occurred: failed calling webhook "l2advertisementvalidationwebhook.metallb.io": failed to call webhook: Post "https://metallb-webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-l2advertisement?timeout=10s": context deadline exceeded The IPAdressPool yaml: apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: default-pool namespace: metallb-system spec: addresses: - 172....

February 16, 2024 · 2 min · Jahnin Rajamoni

Three Node K3s Using Install Script

I was looking for an alternative to k3sup method to install a k3s cluster.( Refer this link on how to setup k3s using k3sup.) Most of the content below is based from the quick start guide here - https://docs.k3s.io/quick-start Generate a token that will be used to join additional nodes to the kubernetes cluster": openssl rand -hex 10 > k3s_secret.txt Install the first control plane node: curl -sfL https://get.k3s.io | K3S_TOKEN=cat k3s_secret....

February 10, 2024 · 3 min · Jahnin Rajamoni

Install NFS CSI Driver in K3S

There are two ways to install the NFS CSI driver 1. Using Helm Charts Makes sure you have installed helm. Reference Link Run the following commands helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system --version v4.6.0 2. Using kubectl Run the below command curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/v4.6.0/deploy/install-driver.sh | bash -s v4.6.0 -- jahnin@ubuntu:~$ curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/v4.6.0/deploy/install-driver.sh | bash -s v4.6.0 -- Installing NFS CSI driver, version: v4....

February 9, 2024 · 2 min · Jahnin Rajamoni

Enable Traefik Dashboard in K3s

K3S deploys traefik as its ingress controller. The traefik dashboard in not enabled by default. To enable the traefik dashboard, SSH to the kubernetes node that is the control plane node. Make sure you are the root user. sudo su - Edit the file: /var/lib/rancher/k3s/server/manifests/traefik.yaml Add the following config to the file under spec->valuesContent. After you save the file, traefik will be redeployed and port 9000 will be exposed. dashboard: enabled: true ports: traefik: expose: true Example config:...

November 17, 2023 · 2 min · Jahnin Rajamoni