Kubernetes Reference
K3s installation notes, basic kubectl commands, and Helm setup references.
On this page
Kubernetes command reference #
kubectl get nodes: Show all nodes connected to the master.kubectl describe node xyz: Show detailed information about a node.
K3s installation notes #
Here is some reference information for a Kubernetes project I am working on.
I will likely continue to add information here for a while as I dig into it.
An approachable package is K3s, you can launch the installation for the master node via:
curl -sfL https://get.k3s.io | sh -
Additional nodes can be added by referencing the IP/DNS name of the master, and a token found at /var/lib/rancher/k3s/server/node-token
curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
Helm #
Use a supported Helm release compatible with your Kubernetes version. Follow the official installation guide rather than running the old Helm 2 installer.
For a K3s server, point Helm at an authorized kubeconfig (do not make the admin kubeconfig world-readable):
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
helm version
helm list --all-namespaces
The former instructions on this page used helm init and a privileged Tiller service account. Those were Helm 2 concepts; Tiller was removed in Helm 3. Do not create that legacy service account for a new installation.