kubectl get services -AShow services across namespaces.
Services, ingress, EndpointSlices, network policies, PVCs, PVs, storage classes, ConfigMaps, Secrets, and nodes.
Discover and expose network paths to workloads.
kubectl get services -AShow services across namespaces.
kubectl describe service web -n paymentsInspect selectors, endpoints, ports, and type.
kubectl get endpoints -n paymentsShow service endpoint IPs.
Inspect EndpointSlice objects used for service discovery.
kubectl get endpointslices -n paymentsInspect EndpointSlice objects used for service discovery.
kubectl get ingress -AShow ingress resources across namespaces.
kubectl describe ingress web -n paymentsInspect rules, backends, and events.
kubectl port-forward deployment/web 8080:8080 -n paymentsForward to a selected pod from a deployment.
kubectl expose pod debug-shell --port=8080 --target-port=8080 --name=debug-shell-svc -n toolsCreate a service from an existing pod.
Control pod-to-pod traffic flow.
kubectl get networkpolicies -AShow NetworkPolicy resources.
kubectl describe networkpolicy default-deny -n paymentsInspect ingress and egress rules.
kubectl apply -f networkpolicy.yamlCreate or update a NetworkPolicy manifest.
kubectl delete networkpolicy allow-metrics -n observabilityRemove a NetworkPolicy.
Inspect and manage PVCs, PVs, and StorageClasses.
kubectl get pvc -AShow PersistentVolumeClaims across namespaces.
kubectl describe pvc data-postgres-0 -n dataInspect requested storage, status, and bound PV.
kubectl get pvShow cluster-wide PersistentVolumes.
kubectl describe pv pvc-12345678Inspect reclaim policy, claim ref, and backing class.
kubectl get storageclassShow available StorageClasses.
kubectl describe storageclass gp3Inspect provisioner and mount options.
kubectl patch pvc data-postgres-0 -n data -p '{"spec":{"resources":{"requests":{"storage":"200Gi"}}}}'Request a larger PVC size when the class supports expansion.
kubectl delete pvc cache-data -n paymentsRemove a PVC; PV behavior depends on reclaim policy.
Manage runtime configuration and credentials.
kubectl get configmaps -AShow ConfigMaps across namespaces.
kubectl describe configmap app-config -n paymentsInspect key-value data and metadata.
kubectl edit configmap app-config -n paymentsUpdate a ConfigMap live.
kubectl get secrets -AShow Secrets across namespaces.
kubectl describe secret app-secret -n paymentsInspect secret type and key names without dumping values.
kubectl get secret app-secret -n payments -o jsonpath='{.data.API_KEY}'Print a base64-encoded secret value.
kubectl get secret app-secret -n payments -o jsonpath='{.data.API_KEY}' | base64 --decodePrint a decoded secret value locally.
kubectl create secret generic app-env --from-env-file=.env.production -n paymentsCreate a secret from an env file.
Inspect cluster nodes and scheduling signals.
kubectl get nodes -o wideShow node roles, versions, and internal IPs.
kubectl describe node worker-02Inspect capacity, allocatable, taints, and conditions.
kubectl taint nodes worker-02 dedicated=ml:NoScheduleAdd a taint to influence scheduling.
kubectl taint nodes worker-02 dedicated=ml:NoSchedule-Remove a taint from a node.
kubectl label node worker-02 nodepool=general --overwriteApply a scheduling label to a node.
kubectl get pods -A --field-selector spec.nodeName=worker-02 -o wideSee what is scheduled on a node.