Skip to content

Commit

Permalink
formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath Kaimal authored and Bharath Kaimal committed Jul 30, 2024
1 parent eb5c573 commit 942daef
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 120 deletions.
65 changes: 41 additions & 24 deletions docs/openshift/configuration/secrets/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,48 @@ spec:
```
=== "OpenShift"
**Create files needed for rest of example.**
` echo -n 'admin' > ./username.txt
**Create files needed for rest of example**
```
echo -n 'admin' > ./username.txt
echo -n '1f2d1e2e67df' > ./password.txt
`
**Creating Secret from files.**
` oc create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
`
**Getting Secret**
` oc get secrets
`
**Gets the Secret's Description.**
` oc describe secrets/db-user-pass
`
```

**Creating Secret from files**

```
oc create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
```

**Getting Secret**

```
oc get secrets
```

**Gets the Secret's Description**

```
oc describe secrets/db-user-pass
```

=== "Kubernetes"
**Create files needed for rest of example**
` echo -n 'admin' > ./username.txt

**Create files needed for rest of example**
```
echo -n 'admin' > ./username.txt
echo -n '1f2d1e2e67df' > ./password.txt
`
**Creates the Secret from the files**
` kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
`
**Gets the Secret**
` kubectl get secrets
`
**Gets the Secret's Description**
` kubectl describe secrets/db-user-pass
`
```
**Creates the Secret from the files**
```
kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
```
**Gets the Secret**
```
kubectl get secrets
```
**Gets the Secret's Description**
```
kubectl describe secrets/db-user-pass
```
2 changes: 1 addition & 1 deletion docs/openshift/configuration/security-contexts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
path: /etc/message
```

**Run to see the errors**
**_Run to see the errors_**

=== "OpenShift"

Expand Down
15 changes: 7 additions & 8 deletions docs/openshift/pods/health-checks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ Prometheus, a CNCF project, can natively monitor Kubernetes, nodes, and Promethe

=== "OpenShift"

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

=== "Kubernetes"

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

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

### References

Expand Down Expand Up @@ -199,10 +199,10 @@ spec:

=== "OpenShift"

````
oc get projects
oc api-resources -o wide
oc api-resources -o name
```
oc get projects
oc api-resources -o wide
oc api-resources -o name

oc get nodes,ns,po,deploy,svc

Expand Down Expand Up @@ -237,4 +237,3 @@ oc api-resources -o name
| --------------------- | -------------------------------------------------------------------- | :----------------------------------------------- |
| **_Try It Yourself_** | | |
| Probes | Create some Health & Startup Probes to find what's causing an issue. | [Probes](../../../labs/kubernetes/lab4/index.md) |
````
12 changes: 6 additions & 6 deletions docs/openshift/pods/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ A Pod encapsulates an application’s container (or, in some cases, multiple con
=== "OpenShift"

[About Pods :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.3/nodes/pods/nodes-pods-using.html){ .md-button target="_blank"}

[Cluster Configuration for Pods :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.3/nodes/pods/nodes-pods-configuring.html){ .md-button target="_blank"}

[Pod Autoscaling :fontawesome-solid-globe:](https://docs.openshift.com/container-platform/4.3/nodes/pods/nodes-pods-autoscaling.html){ .md-button target="_blank"}

=== "Kubernetes"
Expand Down Expand Up @@ -116,7 +116,7 @@ spec:

## Activities

| Task | Description | Link |
| --------------------------------| ------------------ |:----------- |
| *** Try It Yourself *** | | |
| Creating Pods | Create a Pod YAML file to meet certain parameters | [Pod Creation](../../labs/kubernetes/lab1/index.md) |
| Task | Description | Link |
| --------------------- | ------------------------------------------------- | :-------------------------------------------------- |
| **_Try It Yourself_** | | |
| Creating Pods | Create a Pod YAML file to meet certain parameters | [Pod Creation](../../labs/kubernetes/lab1/index.md) |
3 changes: 3 additions & 0 deletions docs/openshift/pods/jobs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ All CronJob schedule: times are based on the timezone of the master where the jo
=== "OpenShift"

[Jobs :fontawesome-solid-briefcase:](https://docs.openshift.com/container-platform/4.3/nodes/jobs/nodes-nodes-jobs.html){ .md-button target="_blank"}

[CronJobs :fontawesome-solid-briefcase:](https://docs.openshift.com/container-platform/4.3/nodes/jobs/nodes-nodes-jobs.html#nodes-nodes-jobs-creating-cron_nodes-nodes-jobs){ .md-button target="_blank"}

=== "Kubernetes"

[Jobs to Completion :fontawesome-solid-briefcase:](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/){ .md-button target="_blank"}

[Cron Jobs :fontawesome-solid-briefcase:](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/){ .md-button target="_blank"}

[Automated Tasks with Cron :fontawesome-solid-briefcase:](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/){ .md-button target="_blank"}

## References
Expand Down
2 changes: 1 addition & 1 deletion docs/openshift/pods/multi-container/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Container images solve many real-world problems with existing packaging and depl

=== "Kubernetes"

[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"}
[Sidecar Logging :fontawesome-solid-boxes-stacked:](https://kubernetes.io/docs/concepts/cluster-administration/logging/#using-a-sidecar-container-with-the-logging-agent){.md-button target="_blank"}

[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"}

Expand Down
186 changes: 112 additions & 74 deletions docs/openshift/pods/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,82 +21,120 @@ Usually is getting familiar with how primitives objects interact with each other
## References

=== "OpenShift"
**MacOS/Linux/Windows command:**
`bash
oc apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
`
**Expose the service using port-forward**
` oc port-forward service/my-service 8080:80 -n debug
`
**Try to access the service**
` curl http://localhost:8080
`
**Try Out these Commands to Debug**
` oc get pods --all-namespaces
`
` oc project debug
`
` oc get deployments
`
` oc describe pod
`
` oc explain Pod.spec.containers.resources.requests
`
` oc explain Pod.spec.containers.livenessProbe
`
` oc edit deployment
`
` oc logs
`
` oc get service
`
` oc get ep
`
` oc describe service
`
` oc get pods --show-labels
`
` oc get deployment --show-labels
`

**MacOS/Linux/Windows command:**
```
oc apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
```

**Expose the service using port-forward**
```
oc port-forward service/my-service 8080:80 -n debug
```

**Try to access the service**
```
curl http://localhost:8080
```

**Try Out these Commands to Debug**
```
oc get pods --all-namespaces
```
```
oc project debug
```
```
oc get deployments
```
```
oc describe pod
```
```
oc explain Pod.spec.containers.resources.requests
```
```
oc explain Pod.spec.containers.livenessProbe
```
```
oc edit deployment
```
```
oc logs
```
```
oc get service
```
```
oc get ep
```
```
oc describe service
```
```
oc get pods --show-labels
```
```
oc get deployment --show-labels
```

=== "Kubernetes"
**MacOS/Linux/Windows command:**
`bash
kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
`
**Expose the service using port-forward**
` kubectl port-forward service/my-service 8080:80 -n debug
`
**Try to access the service**
` curl http://localhost:8080
`
**Try Out these Commands to Debug**
` kubectl get pods --all-namespaces
`
` kubectl config set-context --current --namespace=debug
`
` kubectl get deployments
`
` kubectl describe pod
`
` kubectl explain Pod.spec.containers.resources.requests
`
` kubectl explain Pod.spec.containers.livenessProbe
`
` kubectl edit deployment
`
` kubectl logs
`
` kubectl get service
`
` kubectl get ep
`
` kubectl describe service
`
` kubectl get pods --show-labels
`
` kubectl get deployment --show-labels
`

**MacOS/Linux/Windows command:**
```
kubectl apply -f https://gist.githubusercontent.com/csantanapr/e823b1bfab24186a26ae4f9ec1ff6091/raw/1e2a0cca964c7b54ce3df2fc3fbf33a232511877/debugk8s-bad.yaml
```

**Expose the service using port-forward**
```
kubectl port-forward service/my-service 8080:80 -n debug
```

**Try to access the service**
```
curl http://localhost:8080
```

**Try Out these Commands to Debug**
```
kubectl get pods --all-namespaces
```
```
kubectl config set-context --current --namespace=debug
```
```
kubectl get deployments
```
```
kubectl describe pod
```
```
kubectl explain Pod.spec.containers.resources.requests
```
```
kubectl explain Pod.spec.containers.livenessProbe
```
```
kubectl edit deployment
```
```
kubectl logs
```
```
kubectl get service
```
```
kubectl get ep
```
```
kubectl describe service
```
```
kubectl get pods --show-labels
```
```
kubectl get deployment --show-labels
```

## Activities

Expand Down
5 changes: 2 additions & 3 deletions docs/openshift/services-networking/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ spec:
stern . -n default
```

```

```
<Tab>
</Tab>

=== "OpenShift"

Expand Down
5 changes: 2 additions & 3 deletions docs/openshift/services-networking/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ spec:
stern . -n default
```

```

```
<Tab>
</Tab>

=== "OpenShift"

Expand Down

0 comments on commit 942daef

Please sign in to comment.