From 9d4102c9f19059d594be9fc32fa44734cd47e240 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:34:57 +0530
Subject: [PATCH 01/30] runbooks for backoff
---
backoff/pod-backoff.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 backoff/pod-backoff.md
diff --git a/backoff/pod-backoff.md b/backoff/pod-backoff.md
new file mode 100644
index 0000000..eed7e79
--- /dev/null
+++ b/backoff/pod-backoff.md
@@ -0,0 +1 @@
+sample
\ No newline at end of file
From bc80f4973e720b989bb99e2b9420cde5bcb7cfff Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:34:58 +0530
Subject: [PATCH 02/30] runbooks for backoff
---
.gp.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
new file mode 100644
index 0000000..8441e41
--- /dev/null
+++ b/.gp.yaml
@@ -0,0 +1,14 @@
+name: ""
+runbooks:
+- name: bacckoff
+ desc: runbooks for backoff
+ selectors:
+ - type: labelSelector
+ selector: kubernetes.io/bootstrapping=rbac-defaults
+ - type: jsonPathSelector
+ selector: '{.apiVersion}=rbac.authorization.k8s.io/v1'
+ - type: jsonPathSelector
+ selector: '{.kind}=ClusterRole'
+ - type: jsonPathSelector
+ selector: '{.metadata.name}=cluster-admin'
+ doc: backoff/pod-backoff.md
From beb8895e3d57c935630000b2b41c15cce3ebfaf3 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Thu, 7 Dec 2023 16:08:36 +0530
Subject: [PATCH 03/30] test
---
test/test.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 test/test.md
diff --git a/test/test.md b/test/test.md
new file mode 100644
index 0000000..30d74d2
--- /dev/null
+++ b/test/test.md
@@ -0,0 +1 @@
+test
\ No newline at end of file
From d88d7a5da8adfddc0f97bfda0e1631a467ef2db0 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Thu, 7 Dec 2023 16:08:38 +0530
Subject: [PATCH 04/30] test
---
.gp.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/.gp.yaml b/.gp.yaml
index 8441e41..6798319 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -12,3 +12,17 @@ runbooks:
- type: jsonPathSelector
selector: '{.metadata.name}=cluster-admin'
doc: backoff/pod-backoff.md
+- name: test
+ desc: test
+ selectors:
+ - type: labelSelector
+ selector: app=test
+ - type: jsonPathSelector
+ selector: '{.apiVersion}=v1'
+ - type: jsonPathSelector
+ selector: '{.kind}=Secret'
+ - type: jsonPathSelector
+ selector: '{.metadata.name}=bootstrap-token-abcdef'
+ - type: jsonPathSelector
+ selector: '{.metadata.namespace}=kube-system'
+ doc: test/test.md
From 107a5e820ae499a861a12cd514bba30dfa46173d Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 12 Dec 2023 11:45:36 +0530
Subject: [PATCH 05/30] Update .gp.yaml
---
.gp.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gp.yaml b/.gp.yaml
index 6798319..bfae2ee 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -1,4 +1,5 @@
-name: ""
+name: Blogman-backoff
+desc: Blogman runbooks for backoff
runbooks:
- name: bacckoff
desc: runbooks for backoff
From efe3d7f620376077b66ae5b136e0deb8e5b8c887 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 12 Dec 2023 16:49:58 +0530
Subject: [PATCH 06/30] Delete .gp.yaml
---
.gp.yaml | 29 -----------------------------
1 file changed, 29 deletions(-)
delete mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
deleted file mode 100644
index bfae2ee..0000000
--- a/.gp.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: Blogman-backoff
-desc: Blogman runbooks for backoff
-runbooks:
-- name: bacckoff
- desc: runbooks for backoff
- selectors:
- - type: labelSelector
- selector: kubernetes.io/bootstrapping=rbac-defaults
- - type: jsonPathSelector
- selector: '{.apiVersion}=rbac.authorization.k8s.io/v1'
- - type: jsonPathSelector
- selector: '{.kind}=ClusterRole'
- - type: jsonPathSelector
- selector: '{.metadata.name}=cluster-admin'
- doc: backoff/pod-backoff.md
-- name: test
- desc: test
- selectors:
- - type: labelSelector
- selector: app=test
- - type: jsonPathSelector
- selector: '{.apiVersion}=v1'
- - type: jsonPathSelector
- selector: '{.kind}=Secret'
- - type: jsonPathSelector
- selector: '{.metadata.name}=bootstrap-token-abcdef'
- - type: jsonPathSelector
- selector: '{.metadata.namespace}=kube-system'
- doc: test/test.md
From 4440d1524eac7f103ca28491b6322cbc4ecc4c5d Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 12 Dec 2023 16:50:10 +0530
Subject: [PATCH 07/30] Delete test directory
---
test/test.md | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 test/test.md
diff --git a/test/test.md b/test/test.md
deleted file mode 100644
index 30d74d2..0000000
--- a/test/test.md
+++ /dev/null
@@ -1 +0,0 @@
-test
\ No newline at end of file
From 7e93946ed7276f6bb8e38ec444de8ad40543ea5a Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 12:24:16 +0530
Subject: [PATCH 08/30] blogman-runbook
---
demo/blogman-runbook.md | 64 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 demo/blogman-runbook.md
diff --git a/demo/blogman-runbook.md b/demo/blogman-runbook.md
new file mode 100644
index 0000000..716f57b
--- /dev/null
+++ b/demo/blogman-runbook.md
@@ -0,0 +1,64 @@
+# Kubernetes Resource Troubleshooting Guide
+
+This comprehensive guide will walk you through the process of identifying potential issues in Kubernetes resources and their resolution methodologies with possible performance optimizations.
+
+## Analyzing Kubernetes Resources via openAPI schema
+
+An essential step to troubleshooting any resource is making sure it is defined correctly. You can use OpenAPI schema definitions to inspect the structure and constraints of your Kubernetes resources against their expected form.
+
+Let's take a dummy Kubernetes resource described in YAML format:
+
+```yaml
+# Dummy Kubernetes Resource
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: app-deployment #<<--1
+...
+```
+ _Hint: Pay special attention to the metadata name (annotated with "--1") as it should be unique within a namespace._
+
+## Identifying Issues and Offering Optimizations
+
+If there are unexpected behaviors or issues within the Kubernetes resources, you can explicitly highlight it within the YAML definitions using comments or annotations.
+
+For this, review the existing OpenAPI schema and identify discrepancies. The comparison would sound like this:
+
+```
+According to the OpenAPI schema, the 'metadata.name' should be a string with a maximum length of 253 characters, starting and ending with an alphanumeric character.
+
+However, in the yaml defined above 'metadata.name' is exceeding that limit which may cause issues.
+```
+
+## Useful kubectl commands
+
+> `kubectl describe deployment app-deployment`
+
+This command will help confirm if our deployment is working as expected. Watch for messages about lack of resources, errors in the image name, etc.
+
+## Refining Existing Documentation
+
+When adjusting existing content, the markup formatting should be preserved and prior instruction should be enhanced rather than rewritten.
+
+## Mermaid Flowchart
+
+The following chart describes the process of identifying and addressing problems in Kubernetes resources.
+
+```mermaid
+graph LR
+A[Start]
+A --> B{Analyse Resource YAML against OpenAPI schema}
+B --> |Discrepancy Found| C[Highlight Issues/Optimizations in YAML]
+C --> D[Use kubectl commands for resolution]
+B --> |No Discrepancy| E[Cross-check Prometheus Metrics, Container Logs]
+E --> F{Found Issues?}
+F --> |Yes| D
+F --> |No| G[End: No Issues Detected]
+D --> H{Issues Resolved?}
+H --> |Yes| G
+H --> |No| I[Deep dive: Repeat Process with additional logs/metrics]
+I --> B
+```
+
+This chart provides an understanding of the workflow for troubleshooting and optimizing Kubernetes resources. Follow this guide step-by-step for a seamless solution.
\ No newline at end of file
From 9aaad547805fee46122b13f2ea1c11368a843c05 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 12:24:17 +0530
Subject: [PATCH 09/30] blogman-runbook
---
.gp.yaml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
new file mode 100644
index 0000000..3c431d0
--- /dev/null
+++ b/.gp.yaml
@@ -0,0 +1,15 @@
+name: blogman-1
+desc: blogman-1
+runbooks:
+- name: blogman-runbook
+ desc: blogman-runbook
+ selectors:
+ - type: labelSelector
+ selector: kubernetes.io/bootstrapping=rbac-defaults
+ - type: jsonPathSelector
+ selector: '{.apiVersion}=rbac.authorization.k8s.io/v1'
+ - type: jsonPathSelector
+ selector: '{.kind}=ClusterRoleBinding'
+ - type: jsonPathSelector
+ selector: '{.metadata.name}=cluster-admin'
+ doc: demo/blogman-runbook.md
From 44b64c7afe4eab0bbafbb66344d660f1494f8fda Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 12:41:07 +0530
Subject: [PATCH 10/30] runbook-2
---
backoff/runbook-2.md | 81 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
create mode 100644 backoff/runbook-2.md
diff --git a/backoff/runbook-2.md b/backoff/runbook-2.md
new file mode 100644
index 0000000..1436c42
--- /dev/null
+++ b/backoff/runbook-2.md
@@ -0,0 +1,81 @@
+```markdown
+# Kubernetes Troubleshooting Guide
+This document aims to provide comprehensive guidance on identifying and resolving potential failures or performance optimization opportunities in Kubernetes resources.
+
+## Table of Contents
+
+- [Schema Comparison](#schema-comparison)
+- [Identifying Issues and Performance Optimizations](#identifying-issues-and-performance-optimizations)
+- [Kubectl Commands](#kubectl-commands)
+- [Flowchart](#flowchart)
+
+## Schema Comparison
+We use the OpenAPI schema definitions to compare the expected state to the current state of the Kubernetes resources. Upon finding discrepancies, here is an example:
+
+```yaml
+# This is the expected schema from OpenAPI definition
+kind: Pod
+metadata:
+ name: my-pod
+spec:
+ containers:
+ - image: nginx
+ name: my-pod
+...
+
+# This is your current resource state
+kind: Pod
+metadata:
+spec:
+ containers:
+ - image: nginx
+ name: my-pod
+...
+```
+In the above code, the `metadata.name` field is missing in your current resource state. According to Kubernetes OpenAPI definition:
+
+> "metadata.name" uniquely identifies a resource within its namespace.
+
+## Identifying Issues and Performance Optimizations
+We can point out potential issues and improvements by analyzing resource definitions in YAML format, container logs, and Prometheus metrics.
+
+```yaml
+# Here is a pinpointed area of concern
+kind: Pod
+metadata:
+ name: my-pod
+spec:
+ containers:
+ - image: busybox # Using busybox image could lead to performance issue
+ name: my-pod
+```
+
+## Kubectl Commands
+To understand the current state of Kubernetes resources, execute the following steps:
+
+1. Run the command `kubectl get pods` to list all the pods.
+2. Use command `kubectl describe pod ` to get detailed information about a specific pod.
+
+## Flowchart
+Below is a Mermaid flowchart outlining the troubleshooting procedure:
+
+```mermaid
+graph LR
+A[Start] --> B[Check Pods]
+B --> C{{kubectl get pods}}
+C --> D[Analyzing Pod State]
+D --> E{{kubectl describe pod }}
+E --> F[Compare with OpenAPI Schema]
+F --> G[Identify Issues]
+G --> H[Propose Fixes]
+H --> I[End]
+```
+
+Each block represents an actionable step in the troubleshooting process.
+
+## Conclusion
+By following this guide, you should have a crisper understanding of your Kubernetes resources, and the corrective steps to be taken for resolving the issues and potential performance improvements.
+
+```
+
+**Note:** Replace `` with the name of your pod for a specific solution.
\ No newline at end of file
From 4acfcec8e244d31f7d3e9d80af49335962af3813 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 12:41:09 +0530
Subject: [PATCH 11/30] runbook-2
---
.gp.yaml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/.gp.yaml b/.gp.yaml
index 3c431d0..85bb1a0 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -13,3 +13,23 @@ runbooks:
- type: jsonPathSelector
selector: '{.metadata.name}=cluster-admin'
doc: demo/blogman-runbook.md
+- name: runbook-2
+ desc: runbook-2
+ selectors:
+ - type: labelSelector
+ selector: app=kubeagent
+ - type: labelSelector
+ selector: cluster-id=cbrfa513fcdeed31e452be892de27cb33f9269d
+ - type: labelSelector
+ selector: component=kubeagent-servers
+ - type: labelSelector
+ selector: pod-template-hash=56ff8f6c6
+ - type: jsonPathSelector
+ selector: '{.apiVersion}=v1'
+ - type: jsonPathSelector
+ selector: '{.kind}=Pod'
+ - type: jsonPathSelector
+ selector: '{.metadata.name}=kubeagent-56ff8f6c6-fdds5'
+ - type: jsonPathSelector
+ selector: '{.metadata.namespace}=gopaddle-servers'
+ doc: backoff/runbook-2.md
From 55ff5b293c30284db1937f18020a8380d0b8d487 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 13:10:07 +0530
Subject: [PATCH 12/30] runbook-3
---
backoff/runbook-3.md | 73 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 backoff/runbook-3.md
diff --git a/backoff/runbook-3.md b/backoff/runbook-3.md
new file mode 100644
index 0000000..a37bbc2
--- /dev/null
+++ b/backoff/runbook-3.md
@@ -0,0 +1,73 @@
+# Kubernetes Troubleshooting and Performance Optimization User Guide
+
+This user guide provides an analytical approach to troubleshoot issues in your Kubernetes resources. This also highlights the potential areas of performance improvements. Follow the steps outlined for each area of concern and take corrective actions.
+
+## Table of Contents
+
+ - [1. Schema Comparison](#schema-comparison)
+ - [2. Highlighting Issues and Performance Optimizations](#highlighting-issues-and-performance-optimizations)
+ - [3. Kubectl Commands](#kubectl-commands)
+ - [4. Flow Chart](#flow-chart)
+
+## 1. Schema Comparison
+
+You can use OpenAPI schema definitions to validate your Kubernetes resources by comparing their current state with the expected state. If discrepancies are found, take appropriate actions as suggested.
+
+```yaml
+# schemas.yaml
+CurrentState: |
+ apiVersion: apps/v1
+ kind: Deployment
+ ...
+ExpectedState: |
+ apiVersion: apps/v1
+ kind: Deployment
+ ...
+```
+
+## 2. Highlighting Issues and Performance Optimizations
+
+Ensuing the YAML of your Kubernetes resources are correctly written is crucial. Below, you can see part of a YAML file where issues that require attention have been highlighted:
+
+```yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: myapp-deployment
+spec:
+ replicas:
+ ...
+```
+
+## 3. Kubectl Commands
+
+To identify challenges and resolve them, run the following kubectl commands:
+
+```bash
+kubectl get nodes # Check the status of your nodes
+kubectl get pods -n # Check the status of your pods in a specific namespace
+kubectl describe pod -n # Get detailed information on a specific pod
+```
+
+Follow the step-by-step instructions for execution and expected outcomes.
+
+## 4. Flow Chart
+
+Here is a simple process flow chart to identify improvements or issues:
+
+```bash
+graph TD
+A(Start) -->B{Check Node Status}
+B -->|Node in NotReady status| C[Identify Issues]
+B -->|Node in Ready status| D{Check Pod Status}
+D -->|Pod in Error status| C
+D -->|Pod in Running status| E{Analyse Performance Metrics}
+E -->|Performance Issues found| C
+E -->|Performance is fine| F(End)
+C -->|Issues found| G[Take Corrective Actions]
+G --> F
+```
+
+## Disclaimer
+- This guide does not cover all possible issues or performance improvements within Kubernetes.
+- Always validate changes in a test environment before applying them to production.
\ No newline at end of file
From e7e0017fd8dea35920de8fe0ffd85f00ec424340 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 13:10:08 +0530
Subject: [PATCH 13/30] runbook-3
---
.gp.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.gp.yaml b/.gp.yaml
index 85bb1a0..b67a2e2 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -33,3 +33,9 @@ runbooks:
- type: jsonPathSelector
selector: '{.metadata.namespace}=gopaddle-servers'
doc: backoff/runbook-2.md
+- name: runbook-3
+ desc: runbook-3
+ selectors:
+ - type: labelSelector
+ selector: kubernetes.io/bootstrapping=rbac-defaults
+ doc: backoff/runbook-3.md
From ff03802530055860bca8b4a7bb33399e3031099a Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 15:26:21 +0530
Subject: [PATCH 14/30] Delete .gp.yaml
---
.gp.yaml | 41 -----------------------------------------
1 file changed, 41 deletions(-)
delete mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
deleted file mode 100644
index b67a2e2..0000000
--- a/.gp.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-name: blogman-1
-desc: blogman-1
-runbooks:
-- name: blogman-runbook
- desc: blogman-runbook
- selectors:
- - type: labelSelector
- selector: kubernetes.io/bootstrapping=rbac-defaults
- - type: jsonPathSelector
- selector: '{.apiVersion}=rbac.authorization.k8s.io/v1'
- - type: jsonPathSelector
- selector: '{.kind}=ClusterRoleBinding'
- - type: jsonPathSelector
- selector: '{.metadata.name}=cluster-admin'
- doc: demo/blogman-runbook.md
-- name: runbook-2
- desc: runbook-2
- selectors:
- - type: labelSelector
- selector: app=kubeagent
- - type: labelSelector
- selector: cluster-id=cbrfa513fcdeed31e452be892de27cb33f9269d
- - type: labelSelector
- selector: component=kubeagent-servers
- - type: labelSelector
- selector: pod-template-hash=56ff8f6c6
- - type: jsonPathSelector
- selector: '{.apiVersion}=v1'
- - type: jsonPathSelector
- selector: '{.kind}=Pod'
- - type: jsonPathSelector
- selector: '{.metadata.name}=kubeagent-56ff8f6c6-fdds5'
- - type: jsonPathSelector
- selector: '{.metadata.namespace}=gopaddle-servers'
- doc: backoff/runbook-2.md
-- name: runbook-3
- desc: runbook-3
- selectors:
- - type: labelSelector
- selector: kubernetes.io/bootstrapping=rbac-defaults
- doc: backoff/runbook-3.md
From 2172946bcc777e566476cc33267d412558113532 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 15:26:32 +0530
Subject: [PATCH 15/30] Delete demo directory
---
demo/blogman-runbook.md | 64 -----------------------------------------
1 file changed, 64 deletions(-)
delete mode 100644 demo/blogman-runbook.md
diff --git a/demo/blogman-runbook.md b/demo/blogman-runbook.md
deleted file mode 100644
index 716f57b..0000000
--- a/demo/blogman-runbook.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Kubernetes Resource Troubleshooting Guide
-
-This comprehensive guide will walk you through the process of identifying potential issues in Kubernetes resources and their resolution methodologies with possible performance optimizations.
-
-## Analyzing Kubernetes Resources via openAPI schema
-
-An essential step to troubleshooting any resource is making sure it is defined correctly. You can use OpenAPI schema definitions to inspect the structure and constraints of your Kubernetes resources against their expected form.
-
-Let's take a dummy Kubernetes resource described in YAML format:
-
-```yaml
-# Dummy Kubernetes Resource
-
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: app-deployment #<<--1
-...
-```
- _Hint: Pay special attention to the metadata name (annotated with "--1") as it should be unique within a namespace._
-
-## Identifying Issues and Offering Optimizations
-
-If there are unexpected behaviors or issues within the Kubernetes resources, you can explicitly highlight it within the YAML definitions using comments or annotations.
-
-For this, review the existing OpenAPI schema and identify discrepancies. The comparison would sound like this:
-
-```
-According to the OpenAPI schema, the 'metadata.name' should be a string with a maximum length of 253 characters, starting and ending with an alphanumeric character.
-
-However, in the yaml defined above 'metadata.name' is exceeding that limit which may cause issues.
-```
-
-## Useful kubectl commands
-
-> `kubectl describe deployment app-deployment`
-
-This command will help confirm if our deployment is working as expected. Watch for messages about lack of resources, errors in the image name, etc.
-
-## Refining Existing Documentation
-
-When adjusting existing content, the markup formatting should be preserved and prior instruction should be enhanced rather than rewritten.
-
-## Mermaid Flowchart
-
-The following chart describes the process of identifying and addressing problems in Kubernetes resources.
-
-```mermaid
-graph LR
-A[Start]
-A --> B{Analyse Resource YAML against OpenAPI schema}
-B --> |Discrepancy Found| C[Highlight Issues/Optimizations in YAML]
-C --> D[Use kubectl commands for resolution]
-B --> |No Discrepancy| E[Cross-check Prometheus Metrics, Container Logs]
-E --> F{Found Issues?}
-F --> |Yes| D
-F --> |No| G[End: No Issues Detected]
-D --> H{Issues Resolved?}
-H --> |Yes| G
-H --> |No| I[Deep dive: Repeat Process with additional logs/metrics]
-I --> B
-```
-
-This chart provides an understanding of the workflow for troubleshooting and optimizing Kubernetes resources. Follow this guide step-by-step for a seamless solution.
\ No newline at end of file
From 03ce1c6115aed4d0b83d0b2481c23ddae2f8b721 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Wed, 13 Dec 2023 15:26:44 +0530
Subject: [PATCH 16/30] Delete backoff directory
---
backoff/pod-backoff.md | 1 -
backoff/runbook-2.md | 81 ------------------------------------------
backoff/runbook-3.md | 73 -------------------------------------
3 files changed, 155 deletions(-)
delete mode 100644 backoff/pod-backoff.md
delete mode 100644 backoff/runbook-2.md
delete mode 100644 backoff/runbook-3.md
diff --git a/backoff/pod-backoff.md b/backoff/pod-backoff.md
deleted file mode 100644
index eed7e79..0000000
--- a/backoff/pod-backoff.md
+++ /dev/null
@@ -1 +0,0 @@
-sample
\ No newline at end of file
diff --git a/backoff/runbook-2.md b/backoff/runbook-2.md
deleted file mode 100644
index 1436c42..0000000
--- a/backoff/runbook-2.md
+++ /dev/null
@@ -1,81 +0,0 @@
-```markdown
-# Kubernetes Troubleshooting Guide
-This document aims to provide comprehensive guidance on identifying and resolving potential failures or performance optimization opportunities in Kubernetes resources.
-
-## Table of Contents
-
-- [Schema Comparison](#schema-comparison)
-- [Identifying Issues and Performance Optimizations](#identifying-issues-and-performance-optimizations)
-- [Kubectl Commands](#kubectl-commands)
-- [Flowchart](#flowchart)
-
-## Schema Comparison
-We use the OpenAPI schema definitions to compare the expected state to the current state of the Kubernetes resources. Upon finding discrepancies, here is an example:
-
-```yaml
-# This is the expected schema from OpenAPI definition
-kind: Pod
-metadata:
- name: my-pod
-spec:
- containers:
- - image: nginx
- name: my-pod
-...
-
-# This is your current resource state
-kind: Pod
-metadata:
-spec:
- containers:
- - image: nginx
- name: my-pod
-...
-```
-In the above code, the `metadata.name` field is missing in your current resource state. According to Kubernetes OpenAPI definition:
-
-> "metadata.name" uniquely identifies a resource within its namespace.
-
-## Identifying Issues and Performance Optimizations
-We can point out potential issues and improvements by analyzing resource definitions in YAML format, container logs, and Prometheus metrics.
-
-```yaml
-# Here is a pinpointed area of concern
-kind: Pod
-metadata:
- name: my-pod
-spec:
- containers:
- - image: busybox # Using busybox image could lead to performance issue
- name: my-pod
-```
-
-## Kubectl Commands
-To understand the current state of Kubernetes resources, execute the following steps:
-
-1. Run the command `kubectl get pods` to list all the pods.
-2. Use command `kubectl describe pod ` to get detailed information about a specific pod.
-
-## Flowchart
-Below is a Mermaid flowchart outlining the troubleshooting procedure:
-
-```mermaid
-graph LR
-A[Start] --> B[Check Pods]
-B --> C{{kubectl get pods}}
-C --> D[Analyzing Pod State]
-D --> E{{kubectl describe pod }}
-E --> F[Compare with OpenAPI Schema]
-F --> G[Identify Issues]
-G --> H[Propose Fixes]
-H --> I[End]
-```
-
-Each block represents an actionable step in the troubleshooting process.
-
-## Conclusion
-By following this guide, you should have a crisper understanding of your Kubernetes resources, and the corrective steps to be taken for resolving the issues and potential performance improvements.
-
-```
-
-**Note:** Replace `` with the name of your pod for a specific solution.
\ No newline at end of file
diff --git a/backoff/runbook-3.md b/backoff/runbook-3.md
deleted file mode 100644
index a37bbc2..0000000
--- a/backoff/runbook-3.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Kubernetes Troubleshooting and Performance Optimization User Guide
-
-This user guide provides an analytical approach to troubleshoot issues in your Kubernetes resources. This also highlights the potential areas of performance improvements. Follow the steps outlined for each area of concern and take corrective actions.
-
-## Table of Contents
-
- - [1. Schema Comparison](#schema-comparison)
- - [2. Highlighting Issues and Performance Optimizations](#highlighting-issues-and-performance-optimizations)
- - [3. Kubectl Commands](#kubectl-commands)
- - [4. Flow Chart](#flow-chart)
-
-## 1. Schema Comparison
-
-You can use OpenAPI schema definitions to validate your Kubernetes resources by comparing their current state with the expected state. If discrepancies are found, take appropriate actions as suggested.
-
-```yaml
-# schemas.yaml
-CurrentState: |
- apiVersion: apps/v1
- kind: Deployment
- ...
-ExpectedState: |
- apiVersion: apps/v1
- kind: Deployment
- ...
-```
-
-## 2. Highlighting Issues and Performance Optimizations
-
-Ensuing the YAML of your Kubernetes resources are correctly written is crucial. Below, you can see part of a YAML file where issues that require attention have been highlighted:
-
-```yaml
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: myapp-deployment
-spec:
- replicas:
- ...
-```
-
-## 3. Kubectl Commands
-
-To identify challenges and resolve them, run the following kubectl commands:
-
-```bash
-kubectl get nodes # Check the status of your nodes
-kubectl get pods -n # Check the status of your pods in a specific namespace
-kubectl describe pod -n # Get detailed information on a specific pod
-```
-
-Follow the step-by-step instructions for execution and expected outcomes.
-
-## 4. Flow Chart
-
-Here is a simple process flow chart to identify improvements or issues:
-
-```bash
-graph TD
-A(Start) -->B{Check Node Status}
-B -->|Node in NotReady status| C[Identify Issues]
-B -->|Node in Ready status| D{Check Pod Status}
-D -->|Pod in Error status| C
-D -->|Pod in Running status| E{Analyse Performance Metrics}
-E -->|Performance Issues found| C
-E -->|Performance is fine| F(End)
-C -->|Issues found| G[Take Corrective Actions]
-G --> F
-```
-
-## Disclaimer
-- This guide does not cover all possible issues or performance improvements within Kubernetes.
-- Always validate changes in a test environment before applying them to production.
\ No newline at end of file
From 5dceda86d3d38062a0c36096822577c384e49480 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Fri, 5 Jan 2024 13:11:12 +0530
Subject: [PATCH 17/30] test
---
test.md | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test.md
diff --git a/test.md b/test.md
new file mode 100644
index 0000000..e69de29
From 9834e5694c507150f66255b1091247f2bcbc3f12 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Fri, 5 Jan 2024 13:11:14 +0530
Subject: [PATCH 18/30] test
---
.gp.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
new file mode 100644
index 0000000..9b356e3
--- /dev/null
+++ b/.gp.yaml
@@ -0,0 +1,9 @@
+name: test
+desc: test
+runbooks:
+- name: test
+ desc: test
+ selectors:
+ - type: labelSelector
+ selector: app-test
+ doc: test.md
From b956710b0ea81173f78f08b8f4a39ca387e1cb7e Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:18:33 +0530
Subject: [PATCH 19/30] test
---
test.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/test.md b/test.md
index e69de29..4c6acc3 100644
--- a/test.md
+++ b/test.md
@@ -0,0 +1,66 @@
+# Kubernetes Resources Analysis and Troubleshooting Guide
+
+This guide aims to analyze Kubernetes resources based on available information, identify potential issues or areas for performance improvement, and provides detailed troubleshooting steps.
+Before we begin, make sure that `kubectl` is configured to interact with your cluster. Use the command `kubectl config view` to confirm.
+
+## Analysis of Available Information
+
+The existing content provided is a `ClusterRoleBinding` resource named `calico-kube-controllers`. It binds the cluster role `calico-kube-controllers` to the service account `calico-kube-controllers` in `kube-system` namespace.
+
+There also exists Prometheus metrics data that provides insights into the performance aspects of a Go application. This data includes garbage collection duration, allocated memory, and Goroutine count, among other things.
+
+## Identified Issues and Recommendations
+
+Given that no explicit errors or issues are given in the provided data, the guide will discuss some hypothetical issues that could occur based on the type of data provided:
+
+1. **RoleBinding Issues:** Potential issue can occur if the service account `calico-kube-controllers` doesn't exist, or it is in a different namespace other than `kube-system`. The `ClusterRole` `calico-kube-controllers` may also not exist.
+ - Recommendation: Confirm that the service account and ClusterRole exists. Use the following commands:
+ - `kubectl get serviceaccounts calico-kube-controllers -n kube-system`
+ - `kubectl get clusterroles calico-kube-controllers`
+
+2. **Go App Performance Issues:** If the metrics of `go_memstats_alloc_bytes_total` consistently show a high amount of bytes allocated or if the `go_goroutines` count keeps increasing without coming down, it might suggest a memory leak or high CPU usage issue.
+ - Recommendation: It is recommended to profile the Go application for potential memory leaks or CPU intensive routines.
+
+Let's proceed to the troubleshooting process.
+
+## Step-by-Step Troubleshooting Guide
+
+### Verifying RoleBinding Configuration
+
+1. Verify the service account:
+
+ ```sh
+ # This should return the service account details
+ kubectl get serviceaccounts calico-kube-controllers -n kube-system
+ ```
+
+2. Verify the `ClusterRole`:
+
+ ```sh
+ # This should return the cluster role details
+ kubectl get clusterroles calico-kube-controllers
+ ```
+
+### Profiling the Go Application
+
+Profiling Go applications require the use of pprof package. Follow the guide [here](https://golang.org/pkg/net/http/pprof/) to get started with profiling your Go application.
+
+## Mermaid Flowchart
+
+```mermaid
+graph TD
+ A{Start Profiling} --> B{Is memory consumption increasing over time?}
+ B -->|Yes| C[There might be a memory leak in your Go app]}
+ B -->|No| D{Are Go routines increasing over time?}
+ D -->|Yes| E[There might be Goroutine leakage in your Go app]
+ D -->|No| F[Go app working perfectly fine]
+ C --> G[End Profiling]
+ E --> G[End Profiling]
+ F --> G[End Profiling]
+```
+
+## Conclusion
+
+This guide provided an analysis of Kubernetes resources and insights on identifying potential bottlenecks. It is important to note that troubleshooting Kubernetes requires timely analysis of logs, events, and system metrics. Proactive monitoring and regular audits can help detect and prevent potential problems before they impact your system.
+
+*This document contains information generated by OpenAI's ChatGPT. This AI-generated content has not been independently verified and should be cross-checked against reliable sources.*
From b2eeff5ec0f44ee422fb39b0088b0b5f8a4c3d85 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:18:33 +0530
Subject: [PATCH 20/30] test
From 304b01f324032a9244c1fa330b0f37a69bc9d0fa Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 14:56:44 +0530
Subject: [PATCH 21/30] test
---
test/test1.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 test/test1.md
diff --git a/test/test1.md b/test/test1.md
new file mode 100644
index 0000000..efd261b
--- /dev/null
+++ b/test/test1.md
@@ -0,0 +1 @@
+demo
\ No newline at end of file
From 37e8ae9117da36dedb90b92716f4491ff2965ca6 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 14:56:45 +0530
Subject: [PATCH 22/30] test
---
.gp.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.gp.yaml b/.gp.yaml
index 9b356e3..1673a55 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -7,3 +7,11 @@ runbooks:
- type: labelSelector
selector: app-test
doc: test.md
+- name: test1
+ desc: test
+ selectors:
+ - type: labelSelector
+ selector: app=demo
+ - type: jsonPathSelector
+ selector: (.kind}=deployment
+ doc: test/test1.md
From 0605875f04eec8978a813eb1ea63b6809dabe9cc Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 15:04:10 +0530
Subject: [PATCH 23/30] test
---
test/test1.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/test/test1.md b/test/test1.md
index efd261b..5caa204 100644
--- a/test/test1.md
+++ b/test/test1.md
@@ -1 +1,54 @@
-demo
\ No newline at end of file
+# Kubernetes Troubleshooting Guide
+
+## Introduction and Objectives
+This guide focuses on providing troubleshooting steps for Kubernetes resources. This will guide the user in identifying potential issues, performance improvements, and steps towards resolving the encountered problems.
+
+## Analysis of Available Information
+As no specific information regarding the Kubernetes resources, events or metrics are provided, this section will cover general analysis based on typical Kubernetes operations.
+
+A variety of Kubernetes troubleshooting scenarios would involve the followings:
+- Issues with deploying an application.
+- Pod scaling issues.
+- Service is not accessible.
+- Resource quota exceeded.
+- Inspecting the events of a namespace.
+- Checking health of the different workload resources (Pod, Deployment, StatefulSet, DaemonSet, etc.).
+- Issues with Persistent Volumes.
+
+## Identified Issues and Recommendations
+Here are some common issues and recommended solutions:
+
+1. **Issue:** Pod not running
+ - **Recommendation:** Check Pod status using `kubectl get pods`. Identify and fix the root cause based on error messages from `kubectl describe pod ` or Pod logs using `kubectl logs `.
+
+2. **Issue:** Service not accessible
+ - **Recommendation:** Validate service using `kubectl get svc `. Make sure the Service is associated with the correct target Port and Pod selector. Test connectivity to the Service from within the cluster using tools like `curl` or `wget`.
+
+3. **Issue:** Resource quota exceeded
+ - **Recommendation:** Identify the current resource usage using `kubectl describe quota`. Increase the quota limit if required, or identify potential resources that can be reduced or removed.
+
+## Step-by-Step Troubleshooting Guide
+Useful `kubectl` commands for identifying and resolving issues:
+
+1. To check all the Pods within a namespace use: `kubectl get pods -n `.
+2. To describe a Pod for detailed information use: `kubectl describe pod -n `.
+3. To check logs of a Pod use: `kubectl logs -n `.
+4. To execute commands within a container use: `kubectl exec -it -n -- `.
+5. To check all PersistentVolumes use: `kubectl get pv`.
+6. To describe a PersistentVolume for detailed information use: `kubectl describe pv `.
+
+## Mermaid Flowchart (If Applicable)
+Since this is a generalized guide based on hypothetical scenarios, here is a flowchart summarizing the steps for troubleshooting Pod issues:
+
+```mermaid
+graph TD
+A[Pod Issue Detected] --> B{Check Pod Status}
+B -- Running --> C{Check Pod Logs}
+B -- Not Running --> D{Describe Pod}
+C -- Error Logs --> E[Identify & Fix Issue Based on Logs]
+D -- Error Message --> F[Identify & Fix Issue Based on Description]
+```
+## Conclusion
+The purpose of this guide is to provide a broad overview of troubleshooting techniques for Kubernetes. Although it is impossible to cover all scenarios, it covers the basics most commonly used. Examples of commands, typical problem scenarios, and their solutions should provide a general direction during the problem approach. This guidance's applicability will largely depend on the specific problem context and Kubernetes cluster architecture.
+
+*This document contains information generated by OpenAI's ChatGPT. This AI-generated content has not been independently verified and should be cross-checked against reliable sources.*
From 93479c3a062e6502411695b468b52bf0493a683a Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 15:04:10 +0530
Subject: [PATCH 24/30] test
From 7ef527bd3954314a0f99d289c40df65a6451d3aa Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 15:19:05 +0530
Subject: [PATCH 25/30] test2
---
test/test2.md | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 228 insertions(+)
create mode 100644 test/test2.md
diff --git a/test/test2.md b/test/test2.md
new file mode 100644
index 0000000..5c8b984
--- /dev/null
+++ b/test/test2.md
@@ -0,0 +1,228 @@
+
+**Resource Specification**
+```yaml
+apiVersion: v1
+kind: Pod
+metadata:
+ annotations:
+ cni.projectcalico.org/containerID: '[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]'
+ cni.projectcalico.org/podIP: '[REDACTED_IP]/32'
+ cni.projectcalico.org/podIPs: '[REDACTED_IP]/32'
+ creationTimestamp: '[REDACTED_TIMESTAMP_ISO8601]'
+ generateName: mermaid-5d7d4fbd6d-
+ labels:
+ app: mermaid
+ app-id: '[REDACTED_AZURE_API_KEY]d24b038a'
+ family: servicegroup
+ name: mermaid
+ pod-template-hash: 5d7d4fbd6d
+ released-by: gopaddle
+ servicegroup: mermaid-sr2ai9v6
+ managedFields:
+ - apiVersion: v1
+ fieldsType: FieldsV1
+ fieldsV1:
+ f:metadata:
+ f:generateName: {}
+ f:labels:
+ .: {}
+ f:app: {}
+ f:app-id: {}
+ f:family: {}
+ f:name: {}
+ f:pod-template-hash: {}
+ f:released-by: {}
+ f:servicegroup: {}
+ f:ownerReferences:
+ .: {}
+ k:{"uid":"[REDACTED_UUID]"}: {}
+ f:spec:
+ f:containers:
+ k:{"name":"mermaid"}:
+ .: {}
+ f:image: {}
+ f:imagePullPolicy: {}
+ f:name: {}
+ f:ports:
+ .: {}
+ k:{"containerPort":8098,"protocol":"TCP"}:
+ .: {}
+ f:containerPort: {}
+ f:name: {}
+ f:protocol: {}
+ f:resources: {}
+ f:securityContext:
+ .: {}
+ f:capabilities:
+ .: {}
+ f:add: {}
+ f:terminationMessagePath: {}
+ f:terminationMessagePolicy: {}
+ f:dnsPolicy: {}
+ f:enableServiceLinks: {}
+ f:restartPolicy: {}
+ f:schedulerName: {}
+ f:securityContext: {}
+ f:terminationGracePeriodSeconds: {}
+ manager: kubelite
+ operation: Update
+ time: '[REDACTED_TIMESTAMP_ISO8601]'
+ - apiVersion: v1
+ fieldsType: FieldsV1
+ fieldsV1:
+ f:metadata:
+ f:annotations:
+ .: {}
+ f:cni.projectcalico.org/containerID: {}
+ f:cni.projectcalico.org/podIP: {}
+ f:cni.projectcalico.org/podIPs: {}
+ manager: calico
+ operation: Update
+ subresource: status
+ time: '[REDACTED_TIMESTAMP_ISO8601]'
+ - apiVersion: v1
+ fieldsType: FieldsV1
+ fieldsV1:
+ f:status:
+ f:conditions:
+ k:{"type":"ContainersReady"}:
+ .: {}
+ f:lastProbeTime: {}
+ f:lastTransitionTime: {}
+ f:status: {}
+ f:type: {}
+ k:{"type":"Initialized"}:
+ .: {}
+ f:lastProbeTime: {}
+ f:lastTransitionTime: {}
+ f:status: {}
+ f:type: {}
+ k:{"type":"Ready"}:
+ .: {}
+ f:lastProbeTime: {}
+ f:lastTransitionTime: {}
+ f:status: {}
+ f:type: {}
+ f:containerStatuses: {}
+ f:hostIP: {}
+ f:phase: {}
+ f:podIP: {}
+ f:podIPs:
+ .: {}
+ k:{"ip":"[REDACTED_IP]"}:
+ .: {}
+ f:ip: {}
+ f:startTime: {}
+ manager: kubelite
+ operation: Update
+ subresource: status
+ time: '[REDACTED_TIMESTAMP_ISO8601]'
+ name: mermaid-5d7d4fbd6d-8ppnv
+ namespace: gopaddle
+ ownerReferences:
+ - apiVersion: apps/v1
+ blockOwnerDeletion: true
+ controller: true
+ kind: ReplicaSet
+ name: mermaid-5d7d4fbd6d
+ uid: '[REDACTED_UUID]'
+ resourceVersion: '2938'
+ uid: '[REDACTED_UUID]'
+spec:
+ containers:
+ - image: trov/mermaid-cli:1
+ imagePullPolicy: IfNotPresent
+ name: mermaid
+ ports:
+ - containerPort: 8098
+ name: http
+ protocol: TCP
+ resources: {}
+ securityContext:
+ capabilities:
+ add:
+ - SYS_ADMIN
+ terminationMessagePath: /dev/termination-log
+ terminationMessagePolicy: File
+ volumeMounts:
+ - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+ name: kube-api-access-vkq45
+ readOnly: true
+ dnsPolicy: ClusterFirst
+ enableServiceLinks: true
+ nodeName: ip-10-0-2-193
+ preemptionPolicy: PreemptLowerPriority
+ priority: 0
+ restartPolicy: Always
+ schedulerName: default-scheduler
+ securityContext: {}
+ serviceAccount: default
+ serviceAccountName: default
+ terminationGracePeriodSeconds: 30
+ tolerations:
+ - effect: NoExecute
+ key: node.kubernetes.io/not-ready
+ operator: Exists
+ tolerationSeconds: 300
+ - effect: NoExecute
+ key: node.kubernetes.io/unreachable
+ operator: Exists
+ tolerationSeconds: 300
+ volumes:
+ - name: kube-api-access-vkq45
+ projected:
+ defaultMode: 420
+ sources:
+ - serviceAccountToken:
+ expirationSeconds: 3607
+ path: token
+ - configMap:
+ items:
+ - key: ca.crt
+ path: ca.crt
+ name: kube-root-ca.crt
+ - downwardAPI:
+ items:
+ - fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ path: namespace
+status:
+ conditions:
+ - lastProbeTime: null
+ lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
+ status: 'True'
+ type: Initialized
+ - lastProbeTime: null
+ lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
+ status: 'True'
+ type: Ready
+ - lastProbeTime: null
+ lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
+ status: 'True'
+ type: ContainersReady
+ - lastProbeTime: null
+ lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
+ status: 'True'
+ type: PodScheduled
+ containerStatuses:
+ - containerID: containerd://[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]
+ image: docker.io/trov/mermaid-cli:1
+ imageID: >-
+ docker.io/trov/mermaid-cli@sha256:[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]
+ lastState: {}
+ name: mermaid
+ ready: true
+ restartCount: 0
+ started: true
+ state:
+ running:
+ startedAt: '[REDACTED_TIMESTAMP_ISO8601]'
+ hostIP: '[REDACTED_IP]'
+ phase: Running
+ podIP: '[REDACTED_IP]'
+ podIPs:
+ - ip: '[REDACTED_IP]'
+ qosClass: BestEffort
+ startTime: '[REDACTED_TIMESTAMP_ISO8601]'
+```
From 69d87bcd07c9d8935deb7d5f7e8a940628316b98 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 13 Feb 2024 15:19:06 +0530
Subject: [PATCH 26/30] test2
---
.gp.yaml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/.gp.yaml b/.gp.yaml
index 1673a55..fa95191 100644
--- a/.gp.yaml
+++ b/.gp.yaml
@@ -15,3 +15,29 @@ runbooks:
- type: jsonPathSelector
selector: (.kind}=deployment
doc: test/test1.md
+- name: test2
+ desc: test2
+ selectors:
+ - type: labelSelector
+ selector: app=mermaid
+ - type: labelSelector
+ selector: app-id=appsab909ba8cbe61c46e1cb3f9c4dffd24b038a
+ - type: labelSelector
+ selector: family=servicegroup
+ - type: labelSelector
+ selector: name=mermaid
+ - type: labelSelector
+ selector: pod-template-hash=5d7d4fbd6d
+ - type: labelSelector
+ selector: released-by=gopaddle
+ - type: labelSelector
+ selector: servicegroup=mermaid-sr2ai9v6
+ - type: jsonPathSelector
+ selector: '{.apiVersion}=v1'
+ - type: jsonPathSelector
+ selector: '{.kind}=Pod'
+ - type: jsonPathSelector
+ selector: '{.metadata.name}=mermaid-5d7d4fbd6d-8ppnv'
+ - type: jsonPathSelector
+ selector: '{.metadata.namespace}=gopaddle'
+ doc: test/test2.md
From cc09365d80fb9cda3bedda76a1bf469d2694bec7 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 20 Feb 2024 17:18:31 +0530
Subject: [PATCH 27/30] test
From acfdb8d5a924815d68bc8d6f618eb7e19eb0873c Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Tue, 20 Feb 2024 17:18:33 +0530
Subject: [PATCH 28/30] test
From f482cff04428e205883ef8d014aa1a2cddbdf120 Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Fri, 9 Aug 2024 17:40:44 +0530
Subject: [PATCH 29/30] Delete test directory
---
test/test1.md | 54 ------------
test/test2.md | 228 --------------------------------------------------
2 files changed, 282 deletions(-)
delete mode 100644 test/test1.md
delete mode 100644 test/test2.md
diff --git a/test/test1.md b/test/test1.md
deleted file mode 100644
index 5caa204..0000000
--- a/test/test1.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Kubernetes Troubleshooting Guide
-
-## Introduction and Objectives
-This guide focuses on providing troubleshooting steps for Kubernetes resources. This will guide the user in identifying potential issues, performance improvements, and steps towards resolving the encountered problems.
-
-## Analysis of Available Information
-As no specific information regarding the Kubernetes resources, events or metrics are provided, this section will cover general analysis based on typical Kubernetes operations.
-
-A variety of Kubernetes troubleshooting scenarios would involve the followings:
-- Issues with deploying an application.
-- Pod scaling issues.
-- Service is not accessible.
-- Resource quota exceeded.
-- Inspecting the events of a namespace.
-- Checking health of the different workload resources (Pod, Deployment, StatefulSet, DaemonSet, etc.).
-- Issues with Persistent Volumes.
-
-## Identified Issues and Recommendations
-Here are some common issues and recommended solutions:
-
-1. **Issue:** Pod not running
- - **Recommendation:** Check Pod status using `kubectl get pods`. Identify and fix the root cause based on error messages from `kubectl describe pod ` or Pod logs using `kubectl logs `.
-
-2. **Issue:** Service not accessible
- - **Recommendation:** Validate service using `kubectl get svc `. Make sure the Service is associated with the correct target Port and Pod selector. Test connectivity to the Service from within the cluster using tools like `curl` or `wget`.
-
-3. **Issue:** Resource quota exceeded
- - **Recommendation:** Identify the current resource usage using `kubectl describe quota`. Increase the quota limit if required, or identify potential resources that can be reduced or removed.
-
-## Step-by-Step Troubleshooting Guide
-Useful `kubectl` commands for identifying and resolving issues:
-
-1. To check all the Pods within a namespace use: `kubectl get pods -n `.
-2. To describe a Pod for detailed information use: `kubectl describe pod -n `.
-3. To check logs of a Pod use: `kubectl logs -n `.
-4. To execute commands within a container use: `kubectl exec -it -n -- `.
-5. To check all PersistentVolumes use: `kubectl get pv`.
-6. To describe a PersistentVolume for detailed information use: `kubectl describe pv `.
-
-## Mermaid Flowchart (If Applicable)
-Since this is a generalized guide based on hypothetical scenarios, here is a flowchart summarizing the steps for troubleshooting Pod issues:
-
-```mermaid
-graph TD
-A[Pod Issue Detected] --> B{Check Pod Status}
-B -- Running --> C{Check Pod Logs}
-B -- Not Running --> D{Describe Pod}
-C -- Error Logs --> E[Identify & Fix Issue Based on Logs]
-D -- Error Message --> F[Identify & Fix Issue Based on Description]
-```
-## Conclusion
-The purpose of this guide is to provide a broad overview of troubleshooting techniques for Kubernetes. Although it is impossible to cover all scenarios, it covers the basics most commonly used. Examples of commands, typical problem scenarios, and their solutions should provide a general direction during the problem approach. This guidance's applicability will largely depend on the specific problem context and Kubernetes cluster architecture.
-
-*This document contains information generated by OpenAI's ChatGPT. This AI-generated content has not been independently verified and should be cross-checked against reliable sources.*
diff --git a/test/test2.md b/test/test2.md
deleted file mode 100644
index 5c8b984..0000000
--- a/test/test2.md
+++ /dev/null
@@ -1,228 +0,0 @@
-
-**Resource Specification**
-```yaml
-apiVersion: v1
-kind: Pod
-metadata:
- annotations:
- cni.projectcalico.org/containerID: '[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]'
- cni.projectcalico.org/podIP: '[REDACTED_IP]/32'
- cni.projectcalico.org/podIPs: '[REDACTED_IP]/32'
- creationTimestamp: '[REDACTED_TIMESTAMP_ISO8601]'
- generateName: mermaid-5d7d4fbd6d-
- labels:
- app: mermaid
- app-id: '[REDACTED_AZURE_API_KEY]d24b038a'
- family: servicegroup
- name: mermaid
- pod-template-hash: 5d7d4fbd6d
- released-by: gopaddle
- servicegroup: mermaid-sr2ai9v6
- managedFields:
- - apiVersion: v1
- fieldsType: FieldsV1
- fieldsV1:
- f:metadata:
- f:generateName: {}
- f:labels:
- .: {}
- f:app: {}
- f:app-id: {}
- f:family: {}
- f:name: {}
- f:pod-template-hash: {}
- f:released-by: {}
- f:servicegroup: {}
- f:ownerReferences:
- .: {}
- k:{"uid":"[REDACTED_UUID]"}: {}
- f:spec:
- f:containers:
- k:{"name":"mermaid"}:
- .: {}
- f:image: {}
- f:imagePullPolicy: {}
- f:name: {}
- f:ports:
- .: {}
- k:{"containerPort":8098,"protocol":"TCP"}:
- .: {}
- f:containerPort: {}
- f:name: {}
- f:protocol: {}
- f:resources: {}
- f:securityContext:
- .: {}
- f:capabilities:
- .: {}
- f:add: {}
- f:terminationMessagePath: {}
- f:terminationMessagePolicy: {}
- f:dnsPolicy: {}
- f:enableServiceLinks: {}
- f:restartPolicy: {}
- f:schedulerName: {}
- f:securityContext: {}
- f:terminationGracePeriodSeconds: {}
- manager: kubelite
- operation: Update
- time: '[REDACTED_TIMESTAMP_ISO8601]'
- - apiVersion: v1
- fieldsType: FieldsV1
- fieldsV1:
- f:metadata:
- f:annotations:
- .: {}
- f:cni.projectcalico.org/containerID: {}
- f:cni.projectcalico.org/podIP: {}
- f:cni.projectcalico.org/podIPs: {}
- manager: calico
- operation: Update
- subresource: status
- time: '[REDACTED_TIMESTAMP_ISO8601]'
- - apiVersion: v1
- fieldsType: FieldsV1
- fieldsV1:
- f:status:
- f:conditions:
- k:{"type":"ContainersReady"}:
- .: {}
- f:lastProbeTime: {}
- f:lastTransitionTime: {}
- f:status: {}
- f:type: {}
- k:{"type":"Initialized"}:
- .: {}
- f:lastProbeTime: {}
- f:lastTransitionTime: {}
- f:status: {}
- f:type: {}
- k:{"type":"Ready"}:
- .: {}
- f:lastProbeTime: {}
- f:lastTransitionTime: {}
- f:status: {}
- f:type: {}
- f:containerStatuses: {}
- f:hostIP: {}
- f:phase: {}
- f:podIP: {}
- f:podIPs:
- .: {}
- k:{"ip":"[REDACTED_IP]"}:
- .: {}
- f:ip: {}
- f:startTime: {}
- manager: kubelite
- operation: Update
- subresource: status
- time: '[REDACTED_TIMESTAMP_ISO8601]'
- name: mermaid-5d7d4fbd6d-8ppnv
- namespace: gopaddle
- ownerReferences:
- - apiVersion: apps/v1
- blockOwnerDeletion: true
- controller: true
- kind: ReplicaSet
- name: mermaid-5d7d4fbd6d
- uid: '[REDACTED_UUID]'
- resourceVersion: '2938'
- uid: '[REDACTED_UUID]'
-spec:
- containers:
- - image: trov/mermaid-cli:1
- imagePullPolicy: IfNotPresent
- name: mermaid
- ports:
- - containerPort: 8098
- name: http
- protocol: TCP
- resources: {}
- securityContext:
- capabilities:
- add:
- - SYS_ADMIN
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
- name: kube-api-access-vkq45
- readOnly: true
- dnsPolicy: ClusterFirst
- enableServiceLinks: true
- nodeName: ip-10-0-2-193
- preemptionPolicy: PreemptLowerPriority
- priority: 0
- restartPolicy: Always
- schedulerName: default-scheduler
- securityContext: {}
- serviceAccount: default
- serviceAccountName: default
- terminationGracePeriodSeconds: 30
- tolerations:
- - effect: NoExecute
- key: node.kubernetes.io/not-ready
- operator: Exists
- tolerationSeconds: 300
- - effect: NoExecute
- key: node.kubernetes.io/unreachable
- operator: Exists
- tolerationSeconds: 300
- volumes:
- - name: kube-api-access-vkq45
- projected:
- defaultMode: 420
- sources:
- - serviceAccountToken:
- expirationSeconds: 3607
- path: token
- - configMap:
- items:
- - key: ca.crt
- path: ca.crt
- name: kube-root-ca.crt
- - downwardAPI:
- items:
- - fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- path: namespace
-status:
- conditions:
- - lastProbeTime: null
- lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
- status: 'True'
- type: Initialized
- - lastProbeTime: null
- lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
- status: 'True'
- type: Ready
- - lastProbeTime: null
- lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
- status: 'True'
- type: ContainersReady
- - lastProbeTime: null
- lastTransitionTime: '[REDACTED_TIMESTAMP_ISO8601]'
- status: 'True'
- type: PodScheduled
- containerStatuses:
- - containerID: containerd://[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]
- image: docker.io/trov/mermaid-cli:1
- imageID: >-
- docker.io/trov/mermaid-cli@sha256:[REDACTED_AZURE_API_KEY][REDACTED_AZURE_API_KEY]
- lastState: {}
- name: mermaid
- ready: true
- restartCount: 0
- started: true
- state:
- running:
- startedAt: '[REDACTED_TIMESTAMP_ISO8601]'
- hostIP: '[REDACTED_IP]'
- phase: Running
- podIP: '[REDACTED_IP]'
- podIPs:
- - ip: '[REDACTED_IP]'
- qosClass: BestEffort
- startTime: '[REDACTED_TIMESTAMP_ISO8601]'
-```
From 4c5bb12b1ab5a33b012e759ce8b27d569c85bb8f Mon Sep 17 00:00:00 2001
From: Gayathri R <55439812+Gayathri-Bluemeric@users.noreply.github.com>
Date: Fri, 9 Aug 2024 17:40:55 +0530
Subject: [PATCH 30/30] Delete .gp.yaml
---
.gp.yaml | 43 -------------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 .gp.yaml
diff --git a/.gp.yaml b/.gp.yaml
deleted file mode 100644
index fa95191..0000000
--- a/.gp.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: test
-desc: test
-runbooks:
-- name: test
- desc: test
- selectors:
- - type: labelSelector
- selector: app-test
- doc: test.md
-- name: test1
- desc: test
- selectors:
- - type: labelSelector
- selector: app=demo
- - type: jsonPathSelector
- selector: (.kind}=deployment
- doc: test/test1.md
-- name: test2
- desc: test2
- selectors:
- - type: labelSelector
- selector: app=mermaid
- - type: labelSelector
- selector: app-id=appsab909ba8cbe61c46e1cb3f9c4dffd24b038a
- - type: labelSelector
- selector: family=servicegroup
- - type: labelSelector
- selector: name=mermaid
- - type: labelSelector
- selector: pod-template-hash=5d7d4fbd6d
- - type: labelSelector
- selector: released-by=gopaddle
- - type: labelSelector
- selector: servicegroup=mermaid-sr2ai9v6
- - type: jsonPathSelector
- selector: '{.apiVersion}=v1'
- - type: jsonPathSelector
- selector: '{.kind}=Pod'
- - type: jsonPathSelector
- selector: '{.metadata.name}=mermaid-5d7d4fbd6d-8ppnv'
- - type: jsonPathSelector
- selector: '{.metadata.namespace}=gopaddle'
- doc: test/test2.md