# Kubernetes & kubectl cheat sheets: commands, resources, troubleshooting

> Verified kubectl references: the imperative commands, the core resource types with a sample Deployment, and the describe/logs/events/rollout debugging workflow — checked against the official docs.

- Page URL: https://itinsighthub.com/kubectl/
- Markdown variant of this page: append `?format=md` to any URL on this site or send `Accept: text/markdown`.
- Full site index for AI assistants: https://itinsighthub.com/llms.txt
- Full site export: https://itinsighthub.com/llms-full.txt

# Kubernetes & kubectl cheat sheets

Kubernetes runs containerized workloads across a cluster, and `kubectl` is the command-line client for its API. Everything you do with kubectl falls into three buckets: **commands** that create and inspect, **resources** (the objects like Pods and Deployments you manage), and **troubleshooting** when something is not working. [Commands](https://itinsighthub.com/kubectl/commands/) is the imperative fast path — run, get, describe, logs, exec, apply, delete. [Resources](https://itinsighthub.com/kubectl/resources/) is the object model plus a working Deployment YAML. [Troubleshooting](https://itinsighthub.com/kubectl/troubleshooting/) is the debugging loop — events, describe, logs, exec, rollouts.

Every command is verified against the official Kubernetes documentation and behaves the same on any cluster you point kubectl at — managed (EKS, GKE, AKS) or self-hosted. Two facts worth knowing up front: `kubectl top` only works if the Metrics Server add-on is installed, and `kubectl get all` does not actually return every resource type.

## Cheat sheets

### Commands

run, get, describe, logs, exec, apply, delete, expose, port-forward — the imperative path.

### Resources

Pods, Deployments, Services, ConfigMaps, Secrets and Namespaces — the object model plus a working YAML.

### Troubleshooting

The debug loop: get events, describe, logs, exec, rollout — and the status-code field guide.

## Network tools

[Subnet Calculator](https://itinsighthub.com/subnet-calculator/)[IPv6 Calculator](https://itinsighthub.com/ipv6-subnet-calculator/)[Wildcard Mask](https://itinsighthub.com/wildcard-mask-calculator/)[Range → CIDR](https://itinsighthub.com/ip-range-to-cidr/)[Splitter](https://itinsighthub.com/subnet-splitter/)[Aggregator](https://itinsighthub.com/cidr-aggregator/)[VLSM Calculator](https://itinsighthub.com/vlsm-calculator/)[Practice](https://itinsighthub.com/subnetting-practice/)[Cheat Sheet](https://itinsighthub.com/subnet-cheat-sheet/)

## FAQ

**What is Kubernetes?**

Kubernetes (K8s) is an open-source system for automating the deployment, scaling and operation of containerized applications. It schedules containers onto nodes, keeps the desired number running, restarts failures, rolls out updates, and manages networking and storage. You describe what you want in YAML, and Kubernetes works to keep the cluster matching that state.

**What is kubectl?**

kubectl is the command-line client that talks to a Kubernetes cluster's API server. Every get, create, apply, describe, logs and exec in these sheets is a kubectl command. It reads the cluster connection details from a kubeconfig file (view and switch with kubectl config get-contexts and use-context).

**What is the difference between kubectl run and kubectl create deployment?**

kubectl run creates a single Pod (or can create a Deployment with the right flags). kubectl create deployment creates a Deployment, which manages a set of replicas and handles rolling updates. For anything long-running, use a Deployment; for a quick one-off command or probe, a bare pod via run is fine.

**Where should I start with Kubernetes?**

Start with the resources sheet to learn the object model, then the commands sheet for the daily verbs, and keep the troubleshooting sheet open until the status-code field guide becomes second nature. The official Kubernetes documentation's 'Kubernetes Basics' tutorial is the best free deep dive.

---

© 2026 ITInsightHub · [About](https://itinsighthub.com/about/) · [Contact](https://itinsighthub.com/contact/) · [Privacy](https://itinsighthub.com/privacy/)
