All Shortcuts

Kubernetes (kubectl) Shortcuts & Commands — Complete Cheat Sheet (5)

Complete kubectl commands cheat sheet for Kubernetes cluster management. Covers pod operations, deployments, services, contexts, and namespace management.

About Kubernetes (kubectl)

Kubernetes (kubectl) is a popular DevOps/CLI tool used by professionals worldwide. Learning keyboard shortcuts can dramatically speed up your workflow — studies show shortcut users save an average of 8 days per year compared to mouse-only users.

This page covers all 17 Kubernetes (kubectl) shortcuts across 3 categories: View Resources, Manage Resources, Context & Namespace. Each shortcut includes a description to help you understand when and how to use it effectively.

💡 Pro Tips for Kubernetes (kubectl) Users

Start with the essentials: Learn kubectl get pods (List pods) and kubectl get svc (List services) first — these are the most commonly used.

Practice daily: Pick 2–3 new shortcuts each day and consciously use them instead of the mouse. Within a week, they become muscle memory.

Print this cheat sheet: Keep a reference nearby until shortcuts become automatic. Focus on the View Resources category first.

CLI tip: Create shell aliases for the commands you use most. Combine them with these shortcuts for maximum efficiency.

Related Shortcut Pages

Docker npm / yarn AWS CLI PowerShell tmux GNU Screen

Search all Kubernetes (kubectl) shortcuts interactively

Interactive Shortcut Finder

All Kubernetes (kubectl) Shortcuts

View Resources

ShortcutActionDescription
kubectl get podsList podsList pods in current namespace.
kubectl get svcList servicesList services.
kubectl get nodesList nodesList cluster nodes.
kubectl get allAll resourcesList all resources.

Context & Namespace

ShortcutActionDescription
kubectl config get-contextsList contextsShow available contexts.

Pro Tips

Frequently Asked Questions

How do I list all pods in Kubernetes?

Use 'kubectl get pods' for the current namespace, or 'kubectl get pods --all-namespaces' for all namespaces.

How do I get a shell inside a running pod?

Use 'kubectl exec -it pod-name -- /bin/bash' to open an interactive shell.

How do I view pod logs in Kubernetes?

Use 'kubectl logs pod-name' for logs, add '-f' to follow, or '--previous' for logs from a crashed container.

How do I scale a deployment?

Use 'kubectl scale deployment name --replicas=3' to change the number of pod replicas.

Browse shortcuts for 248 platforms

Explore All