IaC for my personal homelab
Install k0s to /usr/local/bin/k0s
curl -sSLf https://get.k0s.sh | sudo sh
Create a single node cluster
sudo k0s install controller --single
sudo k0s start
You can check the status with
sudo k0s status
Export the kubernetes config to the current user
sudo k0s kubeconfig admin > ~/.kube/config
chmod 600 ~/.kube/config
If you can retrieve nodes and pods, we're good to go!
kubectl get nodes
kubectl get pods -A
To install ArgoCD, run the following commands
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
k0s stores all cluster data (etcd, kube configs, CNI state, etc.) outside the binary, so reinstalling the service simply updates Kubernetes without blowing anything away.
You can check the current version:
k0s version
Download the new version as before
curl -sSLf https://get.k0s.sh | sudo sh
Install the new version
sudo k0s stop
sudo k0s install controller --single --force
sudo k0s start