Skip to content

Commit abd2e42

Browse files
Bharath KaimalBharath Kaimal
authored andcommitted
update to kubernetes-pods-troubleshooting
1 parent c1804ef commit abd2e42

File tree

1 file changed

+76
-113
lines changed
  • docs/openshift/pods/troubleshooting

1 file changed

+76
-113
lines changed

docs/openshift/pods/troubleshooting/index.md

Lines changed: 76 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -18,128 +18,91 @@ Usually is getting familiar with how primitives objects interact with each other
1818

1919
[Debugging Replication Controllers :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-pod-replication-controller/){.md-button target="_blank"}
2020

21-
2221
## References
2322

2423
=== "OpenShift"
25-
** MacOS/Linux/Windows command: **
26-
```bash
24+
**MacOS/Linux/Windows command:**
25+
`bash
2726
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-
** Try to access the service **
35-
```
36-
curl http://localhost:8080
37-
```
38-
39-
** Try Out these Commands to Debug **
40-
```
41-
oc get pods --all-namespaces
42-
```
43-
```
44-
oc project debug
45-
```
46-
```
47-
oc get deployments
48-
```
49-
```
50-
oc describe pod
51-
```
52-
```
53-
oc explain Pod.spec.containers.resources.requests
54-
```
55-
```
56-
oc explain Pod.spec.containers.livenessProbe
57-
```
58-
```
59-
oc edit deployment
60-
```
61-
```
62-
oc logs
63-
```
64-
```
65-
oc get service
66-
```
67-
```
68-
oc get ep
69-
```
70-
```
71-
oc describe service
72-
```
73-
```
74-
oc get pods --show-labels
75-
```
76-
```
77-
oc get deployment --show-labels
78-
```
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+
`
7961

8062
=== "Kubernetes"
81-
82-
** MacOS/Linux/Windows command: **
83-
```bash
63+
**MacOS/Linux/Windows command:**
64+
`bash
8465
kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
85-
```
86-
87-
** Expose the service using port-forward **
88-
```
89-
kubectl port-forward service/my-service 8080:80 -n debug
90-
```
91-
** Try to access the service **
92-
```
93-
curl http://localhost:8080
94-
```
95-
96-
** Try Out these Commands to Debug **
97-
```
98-
kubectl get pods --all-namespaces
99-
```
100-
```
101-
kubectl config set-context --current --namespace=debug
102-
```
103-
```
104-
kubectl get deployments
105-
```
106-
```
107-
kubectl describe pod
108-
```
109-
```
110-
kubectl explain Pod.spec.containers.resources.requests
111-
```
112-
```
113-
kubectl explain Pod.spec.containers.livenessProbe
114-
```
115-
```
116-
kubectl edit deployment
117-
```
118-
```
119-
kubectl logs
120-
```
121-
```
122-
kubectl get service
123-
```
124-
```
125-
kubectl get ep
126-
```
127-
```
128-
kubectl describe service
129-
```
130-
```
131-
kubectl get pods --show-labels
132-
```
133-
```
134-
kubectl get deployment --show-labels
135-
```
136-
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+
`
137100

138101
## Activities
139102

140103
The continuous integration activities focus around Tekton the integration platform. These labs will show you how to build pipelines and test your code before deployment.
141104

142-
| Task | Description | Link |
143-
| --------------------------------| ------------------ |:----------- |
144-
| *** Try It Yourself *** | | |
145-
| Debugging | Find which service is breaking in your cluster and find out why. | [Debugging](../../../labs/kubernetes/lab5/index.md) | 30 min |
105+
| Task | Description | Link |
106+
| ----------------------- | ---------------------------------------------------------------- | :-------------------------------------------------- | ------ |
107+
| **_ Try It Yourself _** | | |
108+
| Debugging | Find which service is breaking in your cluster and find out why. | [Debugging](../../../labs/kubernetes/lab5/index.md) | 30 min |

0 commit comments

Comments
 (0)