Skip to content

Reference Guide

This section provides quick reference materials for Kubernetes cluster operations, including commonly used commands, helpful tools, and best practices for everyday tasks.

The reference guides in this section are designed to help cluster operators and developers quickly find information they need for common tasks without needing to search through lengthy documentation.

The Commands Reference provides:

  • Frequently used kubectl commands organized by category
  • Common command patterns with explanations
  • One-liners for complex operations
  • Command flags and options reference

Visit the Commands Reference for detailed command examples.

The Tools Reference provides:

  • Essential tools for cluster management
  • Installation and setup instructions
  • Common use cases for each tool
  • Integration with existing workflows

Visit the Tools Reference to learn about useful tools for Kubernetes operations.

Terminal window
# List all API resources
kubectl api-resources
# Get details about a specific resource type
kubectl explain <resource>
# Examples:
kubectl explain pod
kubectl explain deployment.spec.strategy
Terminal window
# List available contexts
kubectl config get-contexts
# Switch context
kubectl config use-context <context-name>
# Set namespace for current context
kubectl config set-context --current --namespace=<namespace>
Terminal window
# Get kubectl help
kubectl --help
# Get help for specific commands
kubectl <command> --help
# Kubectl cheat sheet
kubectl --help | grep cheat
  1. Use shortcuts: kubectl get po instead of kubectl get pods
  2. Set default namespace: kubectl config set-context --current --namespace=<namespace>
  3. Use kubectl aliases: Create aliases for common commands
  4. Use kubectl plugins: Install useful plugins with krew
Terminal window
# Get output in different formats
kubectl get pods -o wide
kubectl get pods -o yaml
kubectl get pods -o json
kubectl get pods -o jsonpath='{.items[*].metadata.name}'
kubectl get pods -o custom-columns=NAME:.metadata.name,STATUS:.status.phase
# Sort output
kubectl get pods --sort-by=.metadata.creationTimestamp