Cloud Native Cheatsheet
Essential commands for Kubernetes, Docker, AWS, Terraform, and Helm. Keep your cloud-native development workflow efficient.
Kubernetes Basics
kubectl get podsList all pods in the current namespace
kubectl get pods -AList pods in all namespaces
kubectl describe pod <pod-name>Show detailed information about a pod
kubectl logs <pod-name>View pod logs
kubectl exec -it <pod-name> -- /bin/bashGet an interactive shell in a pod
kubectl apply -f <file>Apply a configuration file
kubectl delete -f <file>Delete resources defined in a file
Kubernetes Advanced
kubectl port-forward <pod-name> <local-port>:<pod-port>Forward a local port to a pod
kubectl scale deployment <deployment-name> --replicas=<number>Scale a deployment
kubectl rollout status deployment/<deployment-name>Check deployment rollout status
kubectl rollout undo deployment/<deployment-name>Rollback a deployment
kubectl get events --sort-by='.lastTimestamp'View cluster events sorted by time
kubectl top nodesShow resource usage of nodes
kubectl top podsShow resource usage of pods
Docker Commands
docker build -t <image-name> .Build a Docker image
docker run -d -p <host-port>:<container-port> <image-name>Run a container in detached mode with port mapping
docker ps -aList all containers (including stopped)
docker logs <container-id>View container logs
docker exec -it <container-id> /bin/bashGet an interactive shell in a container
docker-compose up -dStart services in detached mode
docker system prune -aRemove all unused containers, networks, images
AWS CLI
aws configureConfigure AWS credentials
aws s3 lsList S3 buckets
aws ec2 describe-instancesList EC2 instances
aws eks list-clustersList EKS clusters
aws rds describe-db-instancesList RDS instances
aws cloudformation list-stacksList CloudFormation stacks
aws iam list-usersList IAM users
Terraform
terraform initInitialize a Terraform working directory
terraform planShow execution plan
terraform applyApply changes to infrastructure
terraform destroyDestroy infrastructure
terraform state listList resources in state
terraform import <resource> <id>Import existing infrastructure
terraform outputShow output values
Helm
helm repo add <name> <url>Add a chart repository
helm repo updateUpdate chart repositories
helm install <release-name> <chart>Install a chart
helm listList releases
helm upgrade <release-name> <chart>Upgrade a release
helm rollback <release-name> <revision>Rollback a release
helm uninstall <release-name>Uninstall a release