Difference between revisions of "Kubectl"
From John Freier
| Line 10: | Line 10: | ||
kubectl apply -f [name_of_file] | kubectl apply -f [name_of_file] | ||
| + | |||
| + | == Deploy == | ||
| + | '''Get Deployments''' | ||
| + | kubectl get deploy --namespace=cs | ||
== Pods == | == Pods == | ||
Revision as of 13:07, 11 April 2022
Kubectl is an application that interacts with Kubernetes clusters.
Check the context
This checks who kubectl is connected to.
kubectl config current-context
Apply a configuration yaml file.
kubectl apply -f [name_of_file]
Deploy
Get Deployments
kubectl get deploy --namespace=cs
Pods
Get Pods
This gets all the pods.
kubectl get pods --namespace cs
Delete a pod
kubectl delete pod [pod_name]