From 942daef51eb8ad6515a2ed16ab29596b6337b2c1 Mon Sep 17 00:00:00 2001 From: Bharath Kaimal Date: Tue, 30 Jul 2024 17:06:27 -0500 Subject: [PATCH] formatting updates --- docs/openshift/configuration/secrets/index.md | 65 +++--- .../configuration/security-contexts/index.md | 2 +- docs/openshift/pods/health-checks/index.md | 15 +- docs/openshift/pods/index.md | 12 +- docs/openshift/pods/jobs/index.md | 3 + docs/openshift/pods/multi-container/index.md | 2 +- docs/openshift/pods/troubleshooting/index.md | 186 +++++++++++------- docs/openshift/services-networking/index.md | 5 +- .../openshift/services-networking/services.md | 5 +- 9 files changed, 175 insertions(+), 120 deletions(-) diff --git a/docs/openshift/configuration/secrets/index.md b/docs/openshift/configuration/secrets/index.md index 3fc2370..1409f0e 100644 --- a/docs/openshift/configuration/secrets/index.md +++ b/docs/openshift/configuration/secrets/index.md @@ -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 + ``` diff --git a/docs/openshift/configuration/security-contexts/index.md b/docs/openshift/configuration/security-contexts/index.md index a173450..3591484 100644 --- a/docs/openshift/configuration/security-contexts/index.md +++ b/docs/openshift/configuration/security-contexts/index.md @@ -89,7 +89,7 @@ spec: path: /etc/message ``` -**Run to see the errors** +**_Run to see the errors_** === "OpenShift" diff --git a/docs/openshift/pods/health-checks/index.md b/docs/openshift/pods/health-checks/index.md index 8044772..f3fde2d 100644 --- a/docs/openshift/pods/health-checks/index.md +++ b/docs/openshift/pods/health-checks/index.md @@ -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 @@ -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 @@ -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) | -```` diff --git a/docs/openshift/pods/index.md b/docs/openshift/pods/index.md index 2d926be..2765854 100644 --- a/docs/openshift/pods/index.md +++ b/docs/openshift/pods/index.md @@ -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" @@ -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) | diff --git a/docs/openshift/pods/jobs/index.md b/docs/openshift/pods/jobs/index.md index 0e0a9d0..8431698 100644 --- a/docs/openshift/pods/jobs/index.md +++ b/docs/openshift/pods/jobs/index.md @@ -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 diff --git a/docs/openshift/pods/multi-container/index.md b/docs/openshift/pods/multi-container/index.md index a610f90..ff885f4 100644 --- a/docs/openshift/pods/multi-container/index.md +++ b/docs/openshift/pods/multi-container/index.md @@ -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"} diff --git a/docs/openshift/pods/troubleshooting/index.md b/docs/openshift/pods/troubleshooting/index.md index a6a9374..be4a314 100644 --- a/docs/openshift/pods/troubleshooting/index.md +++ b/docs/openshift/pods/troubleshooting/index.md @@ -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 diff --git a/docs/openshift/services-networking/index.md b/docs/openshift/services-networking/index.md index 7d5807a..53ab549 100644 --- a/docs/openshift/services-networking/index.md +++ b/docs/openshift/services-networking/index.md @@ -83,9 +83,8 @@ spec: stern . -n default ``` -``` - -``` + + === "OpenShift" diff --git a/docs/openshift/services-networking/services.md b/docs/openshift/services-networking/services.md index a452c0b..0beae08 100644 --- a/docs/openshift/services-networking/services.md +++ b/docs/openshift/services-networking/services.md @@ -83,9 +83,8 @@ spec: stern . -n default ``` -``` - -``` + + === "OpenShift"