-
Notifications
You must be signed in to change notification settings - Fork 1
/
cheat_sheet
57 lines (33 loc) · 1.15 KB
/
cheat_sheet
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
kubectl apply -f deployments/nginx.yml
kubectl expose deployment nginx --port=80
kubectl get deployments
kubectl describe deployment nginx
kubectl get pods
kubectl describe pod <pod_name_here>
kubectl get services
kubectl run -it --rm --image everpeace/curl-jq bash bash
kubectl delete deployment nginx
kubectl apply -f deployments/nginx.yml
kubectl apply -f deployments/nginx.yml
kubectl scale --replicas 1 deployment nginx
kubectl run nginx \
--image=nginx:1.14.2 \
--replicas=5 \
--expose --port 80 \
--limits cpu=.5,memory=512Mi \
--env FIPS=1 \
--generator=run-pod/v1 \
--dry-run -o yaml
watch -n 1 kubectl get pods
kubectl edit deployment nginx
kubectl rollout undo deployment.v1.apps/nginx
kubectl apply -f ingresses/ingress-example.yml
minikube ip
kubectl apply -f ingresses/ingress-host-example.yml
kubectl apply -f ingresses/ingress-host-example.yml
kubectl create secret generic nginx-user-pass \
--from-file=./username \
--from-file=./password
kubectl get secret -o yaml nginx-user-pass
kubectl apply -f deployments/nginx-secret.yml
kubectl exec -it <pod_name_here> bashkubectl apply -f deployments/nginx.yml