k3d.cheat 821 B

123456789101112131415161718192021222324252627282930313233343536
  1. % k3d
  2. # Check if docker is running
  3. k3d check-tools
  4. # Start a subshell for a cluster
  5. k3d shell
  6. # Create a single k3s cluster in docker containers
  7. k3d create --name <cluster_name>
  8. # Create a multi-node k3s cluster in docker containers
  9. k3d create --name <name> --workers <worker_count>
  10. # Delete cluster
  11. k3d delete --name <cluster_name>
  12. # Stop cluster
  13. k3d stop --name <cluster_name>
  14. # Start a stopped cluster
  15. k3d start --name <cluster_name>
  16. # List all clusters
  17. k3d list
  18. # Get kubeconfig location for cluster
  19. k3d get-kubeconfig --name <cluster_name>
  20. # Import a comma- or space-separated list of container images from your local docker daemon into the cluster
  21. k3d import-images
  22. # Show a list of commands or help for one command
  23. k3d help
  24. $ cluster_name: k3d list |awk '{print $2}' | awk 'NF {print $0}' | tail -n +2