Development with Kubernetes

Daily Workflow

After Kubernetes is installed (Kubernetes for Development - Install)…

k3d list
k3d start k3s-default
kubectl get pods -w

When the pods are all running, then you can source e.g.


# find the names of the clusters on your workstation
k3d list
# start a cluster
k3d start k3s-default

Set the KUBECONFIG environment variable:

# bash
export KUBECONFIG=$(k3d get-kubeconfig)
# fish
set -x KUBECONFIG (k3d get-kubeconfig)

Run kubectl commands e.g:

kubectl cluster-info

Other Commands

# delete
k3d delete k3s-default



kubectl get configmaps -o yaml


kubectl get endpoints


kubectl get ing


kubectl get pod
kubectl get pods --all-namespaces
kubectl describe pod
# a specific pod (get the name from the 'get pod' command)
kubectl describe pod postgres-78b64dc858-d8ktt
# logs for a pod (get the name from the 'get pod' command)
kubectl logs postgres-78b64dc858-d8ktt -f