Useful Commands

Useful commands to help you get comfortable using Kubernetes on CoreWeave Cloud

Kubernetes is harder to pronounce than it is to use. If you've never used it before, you'll be comfortable deploying your Docker containers on CoreWeave Cloud in no time. We've put the following command reference together to help you perform simple tasks as you get better acquainted.

SIMPLE STATUS COMMANDS
kubectl get [resource_type]
kubectl get deployments # Shows a list of all running deployments
kubectl get pods # Shows a list of all running pods
kubectl get services # Shows a list of all running services
kubectl get pvc # Show a list of all active Persistent Volume Claims
DESCRIBE PODS AND GET LOGS
kubectl describe [resource_type] [resource_name/id]
kubectl describe pod [pod_id] # Shows detailed information about the status of a pod
kubectl logs -f [pod_id] # Gets streaming logs of a pod
DELETE RESOURCES
kubectl delete [resource_type] [resource_name/id]
kubectl delete pod [pod_id] # Deletes a pod, deployment will start a new one
kubectl delete deployment [deployment_name] # Deletes a deployment, will not restart
SCALE DEPLOYMENTS
kubectl scale --replicas=[number] [resource_type]/[resource_name/id]
‚Äč
## Scale a deployment to [number] of replicas
kubectl scale --replicas=[number] deployments/[deployment_name]
INTERACT WITH RUNNING PODS
kubectl exec -it [pod_id] /bin/bash # Opens a bash shell in your pod