Skip to content

Commit 2c37b81

Browse files
Bharath KaimalBharath Kaimal
authored andcommitted
updates to kubernetes-pods
1 parent efc3cf2 commit 2c37b81

File tree

4 files changed

+130
-124
lines changed

4 files changed

+130
-124
lines changed

docs/openshift/pods/health-checks/index.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ The kubelet can optionally perform and react to three kinds of probes on running
2020

2121
=== "OpenShift"
2222

23-
[Application Health :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.14/applications/application-health.html){ .md-button target="_blank"}
23+
[Application Health :fontawesome-solid-heart-pulse:](https://docs.openshift.com/container-platform/4.14/applications/application-health.html){ .md-button target="_blank"}
2424

25-
[Virtual Machine Health :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.14/virt/logging_events_monitoring/virt-monitoring-vm-health.html){ .md-button target="_blank"}
25+
[Virtual Machine Health :fontawesome-solid-heart-pulse:](https://docs.openshift.com/container-platform/4.14/virt/logging_events_monitoring/virt-monitoring-vm-health.html){ .md-button target="_blank"}
2626

2727
=== "Kubernetes"
2828

29-
[Container Probes :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes){ .md-button target="_blank"}
29+
[Container Probes :fontawesome-solid-heart-pulse:](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes){ .md-button target="_blank"}
3030

31-
[Configure Probes :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/){ .md-button target="_blank"}
31+
[Configure Probes :fontawesome-solid-heart-pulse:](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/){ .md-button target="_blank"}
3232

3333
### References
3434

@@ -80,15 +80,15 @@ Kubernetes provides no native storage solution for log data, but you can integra
8080
8181
=== "OpenShift"
8282
83-
[Logs Command :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.13/cli_reference/openshift_cli/developer-cli-commands.html){:target="_blank"}
83+
[Logs Command :fontawesome-solid-file-lines:](https://docs.openshift.com/container-platform/4.13/cli_reference/openshift_cli/developer-cli-commands.html){:target="_blank"}
8484
85-
[Cluster Logging :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.13/logging/cluster-logging.html){:target="_blank"}
85+
[Cluster Logging :fontawesome-solid-file-lines:](https://docs.openshift.com/container-platform/4.13/logging/cluster-logging.html){:target="_blank"}
8686
87-
[Logging Collector :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.13/logging/config/cluster-logging-collector.html){:target="_blank"}
87+
[Logging Collector :fontawesome-solid-file-lines:](https://docs.openshift.com/container-platform/4.13/logging/config/cluster-logging-collector.html){:target="_blank"}
8888
8989
=== "IBM Cloud Kubernetes Service"
9090
91-
[Logging](https://kubernetes.io/docs/concepts/cluster-administration/logging/){:target="_blank"}
91+
[Logging :fontawesome-solid-file-lines:](https://kubernetes.io/docs/concepts/cluster-administration/logging/){:target="_blank"}
9292
9393
### References
9494
@@ -141,13 +141,13 @@ Prometheus, a CNCF project, can natively monitor Kubernetes, nodes, and Promethe
141141

142142
=== "OpenShift"
143143

144-
[Monitoring Application Health :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.13/applications/application-health.html){:target="_blank"}
144+
[Monitoring Application Health :fontawesome-brands-watchman-monitoring:](https://docs.openshift.com/container-platform/4.13/applications/application-health.html){:target="_blank"}
145145

146146
=== "IBM Cloud Kubernetes Service"
147147

148-
[Monitoring Resource Usage :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/){:target="_blank"}
148+
[Monitoring Resource Usage :fontawesome-brands-watchman-monitoring:](https://kubernetes.io/docs/tasks/debug-application-cluster/resource-usage-monitoring/){:target="_blank"}
149149

150-
[Resource Metrics :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/){:target="_blank"}
150+
[Resource Metrics :fontawesome-brands-watchman-monitoring:](https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/){:target="_blank"}
151151

152152
### References
153153

@@ -198,7 +198,8 @@ spec:
198198
```
199199

200200
=== "OpenShift"
201-
```
201+
202+
````
202203
oc get projects
203204
oc api-resources -o wide
204205
oc api-resources -o name
@@ -236,3 +237,4 @@ oc api-resources -o name
236237
| --------------------- | -------------------------------------------------------------------- | :----------------------------------------------- |
237238
| **_Try It Yourself_** | | |
238239
| Probes | Create some Health & Startup Probes to find what's causing an issue. | [Probes](../../../labs/kubernetes/lab4/index.md) |
240+
````
Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Multi-Containers Pod
22

3-
Container images solve many real-world problems with existing packaging and deployment tools, but in addition to these significant benefits, containers offer us an opportunity to fundamentally re-think the way we build distributed applications. Just as service oriented architectures (SOA) encouraged the decomposition of applications into modular, focused services, containers should encourage the further decomposition of these services into closely cooperating modular containers. By virtue of establishing a boundary, containers enable users to build their services using modular, reusable components, and this in turn leads to services that are more reliable, more scalable and faster to build than applications built from monolithic containers.
3+
Container images solve many real-world problems with existing packaging and deployment tools, but in addition to these significant benefits, containers offer us an opportunity to fundamentally re-think the way we build distributed applications. Just as service oriented architectures (SOA) encouraged the decomposition of applications into modular, focused services, containers should encourage the further decomposition of these services into closely cooperating modular containers. By virtue of establishing a boundary, containers enable users to build their services using modular, reusable components, and this in turn leads to services that are more reliable, more scalable and faster to build than applications built from monolithic containers.
44

55
## Resources
66

77
=== "Kubernetes"
88

9-
[Sidecar Logging :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/cluster-administration/logging/#using-a-sidecar-container-with-the-logging-agent){.md-button target="_blank"}
9+
[Sidecar Logging :fontawesome-solid-bxoes-stacked:](https://kubernetes.io/docs/concepts/cluster-administration/logging/#using-a-sidecar-container-with-the-logging-agent){.md-button target="_blank"}
1010

11-
[Shared Volume Communication :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/){.md-button target="_blank"}
11+
[Shared Volume Communication :fontawesome-solid-boxes-stacked:](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/){.md-button target="_blank"}
1212

13-
[Toolkit Patterns :fontawesome-solid-globe:](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/){.md-button target="_blank"}
14-
15-
[Brendan Burns Paper :fontawesome-solid-globe:](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf){.md-button target="_blank"}
13+
[Toolkit Patterns :fontawesome-solid-boxes-stacked:](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/){.md-button target="_blank"}
14+
15+
[Brendan Burns Paper :fontawesome-solid-boxes-stacked:](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45406.pdf){.md-button target="_blank"}
1616

1717
## References
1818

@@ -23,22 +23,27 @@ metadata:
2323
name: my-pod
2424
spec:
2525
volumes:
26-
- name: shared-data
27-
emptyDir: {}
28-
containers:
29-
- name: app
30-
image: bitnami/nginx
31-
volumeMounts:
32-
- name: shared-data
33-
mountPath: /app
34-
ports:
35-
- containerPort: 8080
36-
- name: sidecard
37-
image: busybox
38-
volumeMounts:
3926
- name: shared-data
40-
mountPath: /pod-data
41-
command: ['sh', '-c', 'echo Hello from the side container > /pod-data/index.html && sleep 3600']
27+
emptyDir: {}
28+
containers:
29+
- name: app
30+
image: bitnami/nginx
31+
volumeMounts:
32+
- name: shared-data
33+
mountPath: /app
34+
ports:
35+
- containerPort: 8080
36+
- name: sidecard
37+
image: busybox
38+
volumeMounts:
39+
- name: shared-data
40+
mountPath: /pod-data
41+
command:
42+
[
43+
"sh",
44+
"-c",
45+
"echo Hello from the side container > /pod-data/index.html && sleep 3600",
46+
]
4247
```
4348
4449
```yaml
@@ -49,18 +54,18 @@ metadata:
4954
spec:
5055
shareProcessNamespace: true
5156
containers:
52-
- name: app
53-
image: bitnami/nginx
54-
ports:
55-
- containerPort: 8080
56-
- name: sidecard
57-
image: busybox
58-
securityContext:
59-
capabilities:
60-
add:
61-
- SYS_PTRACE
62-
stdin: true
63-
tty: true
57+
- name: app
58+
image: bitnami/nginx
59+
ports:
60+
- containerPort: 8080
61+
- name: sidecard
62+
image: busybox
63+
securityContext:
64+
capabilities:
65+
add:
66+
- SYS_PTRACE
67+
stdin: true
68+
tty: true
6469
```
6570
6671
=== "OpenShift"
@@ -97,7 +102,7 @@ spec:
97102

98103
## Activities
99104

100-
| Task | Description | Link |
101-
| --------------------------------| ------------------ |:----------- |
102-
| ***Try It Yourself*** | | |
103-
| Multiple Containers | Build a container using legacy container image.| [Multiple Containers](../../../labs/kubernetes/lab3/index.md) |
105+
| Task | Description | Link |
106+
| --------------------- | ----------------------------------------------- | :------------------------------------------------------------ |
107+
| **_Try It Yourself_** | | |
108+
| Multiple Containers | Build a container using legacy container image. | [Multiple Containers](../../../labs/kubernetes/lab3/index.md) |

docs/openshift/pods/tagging/index.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ You can use either labels or annotations to attach metadata to Kubernetes object
1010

1111
=== "OpenShift"
1212

13-
[CLI Label Commands :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.13/cli_reference/openshift_cli/developer-cli-commands.html){.md-button target="_blank"}
13+
[CLI Label Commands :fontawesome-solid-tags:](https://docs.openshift.com/container-platform/4.13/cli_reference/openshift_cli/developer-cli-commands.html){.md-button target="_blank"}
1414

1515
=== "Kubernetes"
1616

17-
[Labels :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/){.md-button target="_blank"}
18-
19-
[Annotations :fontawesome-solid-globe:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/){.md-button target="_blank"}
17+
[Labels :fontawesome-solid-tags:](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/){.md-button target="_blank"}
2018

19+
[Annotations :fontawesome-solid-tags:](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/){.md-button target="_blank"}
2120

2221
## References
2322

@@ -35,8 +34,8 @@ metadata:
3534
gitrepo: "https://github.com/csantanapr/knative"
3635
spec:
3736
containers:
38-
- name: app
39-
image: bitnami/nginx
37+
- name: app
38+
image: bitnami/nginx
4039
```
4140
4241
=== "OpenShift"
@@ -109,4 +108,4 @@ spec:
109108
**Delete the Pod.**
110109
```
111110
kubectl delete pod my-pod
112-
```
111+
```

docs/openshift/pods/troubleshooting/index.md

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Usually is getting familiar with how primitives objects interact with each other
88

99
=== "OpenShift"
1010

11-
[Debugging with ODO :fontawesome-solid-globe:](https://odo.dev/docs/user-guides/advanced/debugging-with-openshift-toolkit){.md-button target="_blank"}
11+
[Debugging with ODO :fontawesome-solid-bug:](https://odo.dev/docs/user-guides/advanced/debugging-with-openshift-toolkit){.md-button target="_blank"}
1212

1313
=== "Kubernetes"
1414

15-
[Debugging Applications :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/){.md-button target="_blank"}
15+
[Debugging Applications :fontawesome-solid-bug:](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/){.md-button target="_blank"}
1616

17-
[Debugging Services :fontawesome-solid-globe:](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/){.md-button target="_blank"}
17+
[Debugging Services :fontawesome-solid-bug:](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/){.md-button target="_blank"}
1818

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

2121
## References
2222

@@ -26,83 +26,83 @@ Usually is getting familiar with how primitives objects interact with each other
2626
oc apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
2727
`
2828
**Expose the service using port-forward**
29-
` oc port-forward service/my-service 8080:80 -n debug
30-
`
29+
` oc port-forward service/my-service 8080:80 -n debug
30+
`
3131
**Try to access the service**
32-
` curl http://localhost:8080
33-
`
32+
` curl http://localhost:8080
33+
`
3434
**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-
`
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+
`
6161

6262
=== "Kubernetes"
6363
**MacOS/Linux/Windows command:**
6464
`bash
6565
kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
6666
`
6767
**Expose the service using port-forward**
68-
` kubectl port-forward service/my-service 8080:80 -n debug
69-
`
68+
` kubectl port-forward service/my-service 8080:80 -n debug
69+
`
7070
**Try to access the service**
71-
` curl http://localhost:8080
72-
`
71+
` curl http://localhost:8080
72+
`
7373
**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-
`
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+
`
100100

101101
## Activities
102102

103103
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.
104104

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 |
105+
| Task | Description | Link | Est. Time |
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)