-
Notifications
You must be signed in to change notification settings - Fork 24
34 lines (27 loc) · 1.02 KB
/
test.yml
File metadata and controls
34 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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: Export kubeconfig path
run: echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
- name: Use Kubernetes Troubleshooting Action
uses: becloudready/k8s-interview-action@v36
- name: Apply Deployment and ConfigMap to Kubernetes
run: |
ls
pwd