https://github.com/becloudready/k8s-interview-action
Kubernetes Interview Challenge Action
https://github.com/becloudready/k8s-interview-action
interview kubernetes
Last synced: 9 days ago
JSON representation
Kubernetes Interview Challenge Action
- Host: GitHub
- URL: https://github.com/becloudready/k8s-interview-action
- Owner: becloudready
- License: mit
- Created: 2025-03-25T18:38:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T14:15:52.000Z (10 months ago)
- Last Synced: 2025-04-10T14:56:11.737Z (10 months ago)
- Topics: interview, kubernetes
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kubernetes Interview Troubleshooting Action
This GitHub Action simulates DNS and ConfigMap issues in a Kubernetes environment and helps troubleshoot them. It allows you to simulate common Kubernetes issues like misconfigured DNS and incorrect ConfigMap references to aid in debugging and testing Kubernetes deployments.
## Features
- Simulates DNS misconfigurations using a custom DNS policy and invalid nameservers.
- Simulates a ConfigMap error by referencing a non-existent key in the deployment.
- Provides a Python script to troubleshoot and detect the simulated issues.
- Can be triggered manually through GitHub Actions' `workflow_dispatch`.
## Prerequisites
- A valid Kubernetes `kubeconfig` file to authenticate with your cluster. The `kubeconfig` should be stored as a GitHub secret.
## Setup
### Step 1: Store `kubeconfig` as a GitHub Secret
1. Go to your GitHub repository.
2. Navigate to **Settings** > **Secrets** > **New repository secret**.
3. Name the secret `KUBECONFIG` and paste the content of your `kubeconfig` file.
### Step 2: Define the Workflow in Your Repository
In your repository, create a GitHub Actions workflow to use the `k8s-interview-action`. Create the file `.github/workflows/k8s-interview.yml` with the following content:
```yaml
name: 'Kubernetes Interview Troubleshooting'
on:
workflow_dispatch: # Only triggers when manually initiated from the GitHub UI
jobs:
run-interview-action:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Use Kubernetes Troubleshooting Action
uses: becloudready/k8s-interview-action@v10
with:
kubeconfig: ${{ secrets.KUBECONFIG }}