@@ -21,82 +21,120 @@ Usually is getting familiar with how primitives objects interact with each other
2121## References
2222
2323=== "OpenShift"
24- ** MacOS/Linux/Windows command:**
25- `bash
26- oc apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
27- `
28- ** Expose the service using port-forward**
29- ` oc port-forward service/my-service 8080:80 -n debug
30- `
31- ** Try to access the service**
32- ` curl http://localhost:8080
33- `
34- ** Try Out these Commands to Debug**
35- ` oc get pods --all-namespaces
36- `
37- ` oc project debug
38- `
39- ` oc get deployments
40- `
41- ` oc describe pod
42- `
43- ` oc explain Pod.spec.containers.resources.requests
44- `
45- ` oc explain Pod.spec.containers.livenessProbe
46- `
47- ` oc edit deployment
48- `
49- ` oc logs
50- `
51- ` oc get service
52- `
53- ` oc get ep
54- `
55- ` oc describe service
56- `
57- ` oc get pods --show-labels
58- `
59- ` oc get deployment --show-labels
60- `
24+
25+ **MacOS/Linux/Windows command:**
26+ ```
27+ oc apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
28+ ```
29+
30+ **Expose the service using port-forward**
31+ ```
32+ oc port-forward service/my-service 8080:80 -n debug
33+ ```
34+
35+ **Try to access the service**
36+ ```
37+ curl http://localhost:8080
38+ ```
39+
40+ **Try Out these Commands to Debug**
41+ ```
42+ oc get pods --all-namespaces
43+ ```
44+ ```
45+ oc project debug
46+ ```
47+ ```
48+ oc get deployments
49+ ```
50+ ```
51+ oc describe pod
52+ ```
53+ ```
54+ oc explain Pod.spec.containers.resources.requests
55+ ```
56+ ```
57+ oc explain Pod.spec.containers.livenessProbe
58+ ```
59+ ```
60+ oc edit deployment
61+ ```
62+ ```
63+ oc logs
64+ ```
65+ ```
66+ oc get service
67+ ```
68+ ```
69+ oc get ep
70+ ```
71+ ```
72+ oc describe service
73+ ```
74+ ```
75+ oc get pods --show-labels
76+ ```
77+ ```
78+ oc get deployment --show-labels
79+ ```
6180
6281=== "Kubernetes"
63- ** MacOS/Linux/Windows command:**
64- `bash
65- kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
66- `
67- ** Expose the service using port-forward**
68- ` kubectl port-forward service/my-service 8080:80 -n debug
69- `
70- ** Try to access the service**
71- ` curl http://localhost:8080
72- `
73- ** Try Out these Commands to Debug**
74- ` kubectl get pods --all-namespaces
75- `
76- ` kubectl config set-context --current --namespace=debug
77- `
78- ` kubectl get deployments
79- `
80- ` kubectl describe pod
81- `
82- ` kubectl explain Pod.spec.containers.resources.requests
83- `
84- ` kubectl explain Pod.spec.containers.livenessProbe
85- `
86- ` kubectl edit deployment
87- `
88- ` kubectl logs
89- `
90- ` kubectl get service
91- `
92- ` kubectl get ep
93- `
94- ` kubectl describe service
95- `
96- ` kubectl get pods --show-labels
97- `
98- ` kubectl get deployment --show-labels
99- `
82+
83+ **MacOS/Linux/Windows command:**
84+ ```
85+ kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
86+ ```
87+
88+ **Expose the service using port-forward**
89+ ```
90+ kubectl port-forward service/my-service 8080:80 -n debug
91+ ```
92+
93+ **Try to access the service**
94+ ```
95+ curl http://localhost:8080
96+ ```
97+
98+ **Try Out these Commands to Debug**
99+ ```
100+ kubectl get pods --all-namespaces
101+ ```
102+ ```
103+ kubectl config set-context --current --namespace=debug
104+ ```
105+ ```
106+ kubectl get deployments
107+ ```
108+ ```
109+ kubectl describe pod
110+ ```
111+ ```
112+ kubectl explain Pod.spec.containers.resources.requests
113+ ```
114+ ```
115+ kubectl explain Pod.spec.containers.livenessProbe
116+ ```
117+ ```
118+ kubectl edit deployment
119+ ```
120+ ```
121+ kubectl logs
122+ ```
123+ ```
124+ kubectl get service
125+ ```
126+ ```
127+ kubectl get ep
128+ ```
129+ ```
130+ kubectl describe service
131+ ```
132+ ```
133+ kubectl get pods --show-labels
134+ ```
135+ ```
136+ kubectl get deployment --show-labels
137+ ```
100138
101139## Activities
102140
0 commit comments