# creates a cluster
k3d cluster create mycluster -p "8081:80@loadbalancer" -p "8082:443@loadbalancer" --agents 2
# displays cluster information (kubectl configuration is automatically updated and set to use the new cluster context)
kubectl cluster-info
# ensures coredns and traefik (ingress controller) are deployed by default (k3s behavior)
kubectl get deploy -n kube-system
# (optional) writes and uses specific kubectl configuration
export KUBECONFIG="$(k3d kubeconfig write mycluster)"