Deployments
Create Deployment
Creates a deployment using a specified container image.
kubectl create deployment <name> --image=<image>Scale Deployment
Scales the number of replicas in a deployment.
kubectl scale deployment <name> --replicas=<number>Expose Service
Exposes a deployment as a service on a specified port.
kubectl expose deployment <name> --port=<port>Update Deployment Image
Updates the container image used in a deployment.
kubectl set image deployment/<deployment-name> <container-name>=<new-image>Rollout Status
Checks the status of a deployment rollout.
kubectl rollout status deployment/<deployment-name>Rollback Deployment
Rolls back a deployment to a previous revision.
kubectl rollout undo deployment/<deployment-name>Delete Deployment
Deletes a deployment.
kubectl delete deployment <name>Pods
List Pods
Lists all pods in the Kubernetes cluster.
kubectl get podsDescribe Pod
Describes detailed information about a specific pod.
kubectl describe pod <pod-name>Logs of Pod
Displays the logs of a specific pod.
kubectl logs <pod-name>Exec into Pod
Opens an interactive shell session inside a specific pod.
kubectl exec -it <pod-name> -- /bin/bashDelete Pod
Deletes a specific pod.
kubectl delete pod <pod-name>Jobs
Run Job
Runs a one-time job using a specified container image.
kubectl run <name> --image=<image> --restart=NeverList Jobs
Lists all jobs in the Kubernetes cluster.
kubectl get jobsDescribe Job
Describes detailed information about a specific job.
kubectl describe job <job-name>Delete Job
Deletes a specific job.
kubectl delete job <job-name>CronJobs
Create CronJob
Creates a cron job using a specified container image.
kubectl create cronjob <name> --image=<image>List CronJobs
Lists all cron jobs in the Kubernetes cluster.
kubectl get cronjobsDescribe CronJob
Describes detailed information about a specific cron job.
kubectl describe cronjob <cronjob-name>Delete CronJob
Deletes a specific cron job.
kubectl delete cronjob <cronjob-name>