Kubernetes Interview Troubleshooting #42
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: 'Kubernetes Interview Troubleshooting' | |
on: | |
workflow_dispatch: # Only triggers when manually initiated from the GitHub UI | |
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 "${{ vars.KUBECONFIG }}" > ~/.kube/config | |
kubectl get pods -A | |
- name: Use Kubernetes Troubleshooting Action | |
uses: becloudready/k8s-interview-action@v35 | |
env: | |
KUBECONFIG: ${{ vars.KUBECONFIG }} | |
- name: Apply Deployment and ConfigMap to Kubernetes | |
run: | | |
ls | |
pwd | |