exec: Run a command inside a running container — usually an interactive shell for debugging. kubectl exec runs a command inside a running container. kubectl exec -it web-7d9f8c -- sh opens an interactive shell, and kubectl exec deploy/web -- php artisan migrate runs a one-off command. It is the standard way to look inside a container when something is wrong: check a config file, test a database connection, or run a maintenance command.
Treat it as a diagnostic tool. Changes you make inside a container by hand are lost when the pod restarts, so real fixes belong in the image or the manifests. Many production images are minimal and have no shell at all, which is good for security. For those, kubectl debug can attach a temporary debugging container to the pod without changing the original image.
Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.
Design, organize, and manage Helm charts for templating and packaging Kubernetes applications with reusable configurations. Use when creating Helm charts, packaging Kubernetes applications, or implementing templated deployments.
Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.