Debug Kubernetes Issues #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Debug Kubernetes Issues | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| namespace: | |
| description: "Namespace to deploy to" | |
| required: false | |
| default: "troubleshooting" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install kubectl | |
| run: | | |
| curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
| sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
| kubectl version --client | |
| - name: Configure Kubernetes cluster | |
| run: | | |
| mkdir -p ~/.kube | |
| echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config | |
| chmod 600 ~/.kube/config | |
| - name: Run Kubernetes Troubleshooting Action | |
| uses: becloudready/k8s-interview-action@v7 | |
| with: | |
| kubeconfig: ${{ secrets.KUBECONFIG }} | |
| namespace: ${{ github.event.inputs.namespace || 'default' }} | |
| - name: Apply Deployment and ConfigMap to Kubernetes | |
| run: | | |
| ls | |
| pwd | |