kubectl to EKS
Once your kubeconfig points at the cluster, deploying to EKS is ordinary kubectl.
Syntax
kubectl apply -f manifest.yamlAfter aws eks update-kubeconfig, EKS behaves like any Kubernetes cluster. You use the same kubectl commands you'd use anywhere.
The everyday commands
kubectl apply -f— create or update resources from a manifest.kubectl get/describe— inspect resources and events.kubectl logsandkubectl exec— read logs and run commands in a container.kubectl rollout— manage and roll back Deployments.
Because it's standard Kubernetes, your existing manifests, CI pipelines, and GitOps tools work without modification.
Example
# Deploy an app and watch it come up
kubectl apply -f app.yaml
kubectl get pods -w
# Inspect and debug
kubectl describe deployment web
kubectl logs deploy/web
kubectl rollout status deploy/webWhen to use it
- A developer applies a Deployment manifest to a staging EKS cluster using kubectl apply to validate the YAML works before promoting to production.
- A release engineer runs kubectl rollout status to block a CI/CD pipeline step until a new Deployment version is fully rolled out on the cluster.
- A platform operator uses kubectl set image to do a quick hotfix image update on a running Deployment without editing the full YAML.
More examples
Apply a Deployment to EKS
Updates the kubeconfig to point at the EKS cluster, applies the manifest, and waits for the rollout to complete successfully.
aws eks update-kubeconfig --name prod --region us-east-1
kubectl apply -f deployment.yaml
kubectl rollout status deployment/my-appQuick image update with kubectl
Updates the container image on a live Deployment and blocks until all pods are running the new version or the timeout is reached.
kubectl set image deployment/my-app \
app=123456789.dkr.ecr.us-east-1.amazonaws.com/my-app:v2.1.0
kubectl rollout status deployment/my-app --timeout=120sRoll back a failed deployment
Shows the revision history, rolls back to the previous stable version, and confirms new pods are running with the old image.
kubectl rollout history deployment/my-app
kubectl rollout undo deployment/my-app
kubectl get pods -l app=my-app
Discussion