Premium Kubernetes Emulator: 50 explained kubectl commands
Run the emulator, copy a command from the table, and watch the text output plus the node canvas to understand which resource moves, where it runs, and what changes inside the cluster.
Premium Kubernetes Emulator
Learn Kubernetes by running simulated commands with terminal output, explanations and node canvas.
🔒 This emulator does not connect to a real cluster. It simulates kubectl for safe learning.
How to use it
- Run the commands in order first so resources exist before checking services, endpoints, HPA or ingress.
- The node canvas shows pods, private IPs, services, profile and simulated permissions.
- The lab is safe: it does not connect to a real cluster.
Responsive kubectl command table
| # | Category | Command | Explanation | Action |
|---|---|---|---|---|
| 1 | Basics | kubectl version --client | Shows the local kubectl client version to validate client compatibility. | |
| 2 | Basics | kubectl cluster-info | Shows control plane and main cluster service information. | |
| 3 | Context | kubectl config current-context | Shows the active context where kubectl will send commands. | |
| 4 | Context | kubectl config get-contexts | Lists configured contexts, user, cluster and associated namespace. | |
| 5 | Security/RBAC | kubectl auth can-i get pods | Checks whether the current profile can list pods according to RBAC. | |
| 6 | API | kubectl api-resources | Lists available resources, aliases, API version and namespace scope. | |
| 7 | API | kubectl api-versions | Shows available API versions for compatible manifests. | |
| 8 | API | kubectl explain pod | Explains the structure and main fields of the Pod resource. | |
| 9 | Nodes | kubectl get nodes | Lists cluster nodes and their Ready/NotReady state. | |
| 10 | Nodes | kubectl describe node ww-node-02 | Shows capacity, conditions, role and private IP of the worker node. | |
| 11 | Nodes | kubectl top nodes | Shows simulated CPU and memory metrics by node. | |
| 12 | Namespaces | kubectl get namespaces | Lists namespaces available in the cluster. | |
| 13 | Namespaces | kubectl create namespace ww-lab | Creates a lab namespace to isolate resources. | |
| 14 | Namespaces | kubectl label namespace ww-lab environment=training | Adds a label to the namespace for classification and filtering. | |
| 15 | Context | kubectl config set-context --current --namespace=ww-lab | Sets ww-lab as the default namespace for the current context. | |
| 16 | Pods | kubectl get pods -A | Lists pods across all namespaces, including kube-system. | |
| 17 | Pods | kubectl get pods | Lists pods in the current namespace. | |
| 18 | Pods | kubectl get pods -o wide | Shows pods with private IP and assigned node. | |
| 19 | Pods | kubectl get pods --show-labels | Lists pods with labels to understand selectors and service relationships. | |
| 20 | Workloads | kubectl create deployment web --image=nginx:1.27 | Creates a Deployment named web using the nginx image. | |
| 21 | Workloads | kubectl get deployments | Lists deployments and available replicas. | |
| 22 | Workloads | kubectl describe deployment web | Shows Deployment details, image, strategy and replicas. | |
| 23 | Workloads | kubectl scale deployment web --replicas=3 | Scales the Deployment to three replicas distributed across nodes. | |
| 24 | Workloads | kubectl get rs | Lists ReplicaSets created by the Deployment. | |
| 25 | Networking/Services | kubectl expose deployment web --port=80 --target-port=80 | Creates a ClusterIP Service to route internal traffic to pods. | |
| 26 | Networking/Services | kubectl get svc | Lists services and internal cluster IPs. | |
| 27 | Networking/Services | kubectl describe svc web | Shows selector, ports and endpoints of the web service. | |
| 28 | Networking/Services | kubectl get endpoints | Lists private endpoints targeted by the Service. | |
| 29 | Troubleshooting | kubectl logs -l app=web | Queries logs from pods matching the app=web label. | |
| 30 | Troubleshooting | kubectl describe pod web-7d8b | Shows events, state and details for the simulated pod. | |
| 31 | Metrics | kubectl top pods | Shows simulated CPU and memory usage by pod. | |
| 32 | Operations | kubectl exec deploy/web -- nginx -v | Runs a command inside the Deployment container. | |
| 33 | Updates | kubectl set image deployment/web nginx=nginx:1.28 | Updates the Deployment image and triggers a rolling update. | |
| 34 | Updates | kubectl rollout status deployment/web | Checks whether the rollout completed successfully. | |
| 35 | Updates | kubectl rollout history deployment/web | Shows the Deployment revision history. | |
| 36 | Updates | kubectl rollout undo deployment/web | Rolls the Deployment back to the previous version. | |
| 37 | Configuration | kubectl create configmap web-config --from-literal=ENV=training | Creates a ConfigMap with non-sensitive configuration. | |
| 38 | Configuration | kubectl get configmap | Lists ConfigMaps in the current namespace. | |
| 39 | Configuration | kubectl describe configmap web-config | Shows keys and values in the simulated ConfigMap. | |
| 40 | Secrets | kubectl create secret generic web-secret --from-literal=API_KEY=demo | Creates a generic Secret to represent sensitive data. | |
| 41 | Secrets | kubectl get secret | Lists Secrets without exposing values. | |
| 42 | Secrets | kubectl describe secret web-secret | Describes the Secret while masking sensitive values. | |
| 43 | Autoscaling | kubectl autoscale deployment web --cpu-percent=70 --min=2 --max=6 | Creates a simulated HPA to scale by CPU. | |
| 44 | Autoscaling | kubectl get hpa | Lists the HPA, CPU target and current replicas. | |
| 45 | Autoscaling | kubectl describe hpa web | Shows metric details, minimum and maximum replicas. | |
| 46 | Ingress | kubectl apply -f ingress-web.yaml | Applies a simulated Ingress manifest to expose HTTP. | |
| 47 | Ingress | kubectl get ingress | Lists Ingress, host, class and entry address. | |
| 48 | Ingress | kubectl describe ingress web-ingress | Describes host/path rules that route to the web Service. | |
| 49 | Troubleshooting | kubectl get events | Lists recent events useful for diagnosing scheduling and startup. | |
| 50 | Cleanup | kubectl delete namespace ww-lab | Deletes the namespace and cleans up lab resources. |