Skip to content

Commit a070887

Browse files
Fix: Updated Minikube workflow to use Docker driver and stable runner
1 parent b310ad9 commit a070887

1 file changed

Lines changed: 13 additions & 24 deletions

File tree

.github/workflows/minikube-ci.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,35 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
87

98
jobs:
109
test-on-minikube:
11-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-22.04 # 👈 More stable than 24.04
1211

1312
steps:
14-
- name: Checkout repository
13+
- name: Checkout code
1514
uses: actions/checkout@v3
1615

17-
- name: Install Docker (if needed)
18-
run: |
19-
sudo apt-get update
20-
sudo apt-get install -y docker.io
21-
22-
- name: Install Minikube
16+
- name: Install Minikube and Kubectl
2317
run: |
2418
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
2519
sudo install minikube-linux-amd64 /usr/local/bin/minikube
20+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
21+
chmod +x kubectl
22+
sudo mv kubectl /usr/local/bin/
2623
27-
- name: Start Minikube
24+
- name: Start Minikube with Docker driver
2825
run: |
26+
sudo apt-get update && sudo apt-get install -y conntrack
2927
minikube start --driver=docker
30-
minikube status
28+
kubectl get pods -A
3129
32-
- name: Apply Kubernetes YAMLs
30+
- name: Apply Kubernetes manifests
3331
run: |
3432
kubectl apply -f k8s/
35-
36-
- name: Wait for Deployment Rollout
37-
run: |
38-
kubectl rollout status deployment/hello-app --timeout=120s
39-
40-
- name: Verify Pods and Services
41-
run: |
42-
kubectl get pods
43-
kubectl get svc
33+
kubectl rollout status deployment/my-deployment
34+
kubectl get all
4435
4536
- name: Stop Minikube
4637
if: always()
47-
run: |
48-
minikube stop
49-
minikube delete
38+
run: minikube stop

0 commit comments

Comments
 (0)