-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmd k8s.txt
35 lines (24 loc) · 889 Bytes
/
cmd k8s.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
kubectl expose deployment hello-minikube --type=NodePort
service cmd
minikube service <service name> --url
run cmd
kubectl run nginx --image=nginx
replicaset cmd
kubectl delete replicaset <name of replicaset> also delete all underlying PODs
kubectl replace -f <name file>.yml
kubectl scale - replicas=<number of replicas> <name file>.yml
delete cmd
kubectl delete <pods|replicaset|deployment|service> <name>
create cmd
kubectl create -f <name file>.yml |--record
update cmd
kubectl apply -f <file name>.yml
kubectl set <property> <pods|replicaset|deployment|service>/<property name> <new value of the property>
get cmd
kubectl get <pods|replicaset|deployment|service>
kubectl get all
status cmd
kubectl rollout status deployment/<name of the deployment>
kubectl rollout hystory deployment/<name of the deployment>
rollback cmd
kubectl rollout undo deployment/<property name>