Skip to content

Commit 63ea650

Browse files
Initial working Minikube CI setup with Nginx
1 parent 4319320 commit 63ea650

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/minikube-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
test-on-minikube:
10-
runs-on: ubuntu-22.04 # 👈 More stable than 24.04
10+
runs-on: ubuntu-22.04
1111

1212
steps:
1313
- name: Checkout code
@@ -17,7 +17,7 @@ jobs:
1717
run: |
1818
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
1919
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"
20+
curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
2121
chmod +x kubectl
2222
sudo mv kubectl /usr/local/bin/
2323
@@ -30,7 +30,8 @@ jobs:
3030
- name: Apply Kubernetes manifests
3131
run: |
3232
kubectl apply -f k8s/
33-
kubectl rollout status deployment/hello-app
33+
echo "Waiting for deployment rollout..."
34+
kubectl rollout status deployment/hello-app || (kubectl describe deployment hello-app && kubectl get pods && kubectl describe pods && exit 1)
3435
kubectl get all
3536
3637
- name: Stop Minikube

k8s/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ spec:
1313
app: hello-app
1414
spec:
1515
containers:
16-
- name: hello-container
17-
image: k8s.gcr.io/echoserver:1.4
16+
- name: hello-app
17+
image: nginx # Use a known public image
1818
ports:
19-
- containerPort: 8080
19+
- containerPort: 80

k8s/service.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ spec:
88
ports:
99
- protocol: TCP
1010
port: 80
11-
targetPort: 8080
12-
type: ClusterIP
11+
targetPort: 80

0 commit comments

Comments
 (0)