Skip to content

Commit

Permalink
Update nginx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chbinousamy authored Jan 31, 2024
1 parent a9ea8ed commit 23d64b8
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,29 @@ jobs:
name: empty
namespace: metallb-system
EOF
- name: Deploy Echo Server
run: |
kubectl run echo --image=inanimate/echo-server --replicas=3 --port=8080
kubectl wait pod --all --for=condition=Ready -n default
kubectl expose deployment echo --type=LoadBalancer
kubectl get pods
kubectl get services
kubectl describe services echo
kubectl get services | grep echo | awk '{ print $4 }'
curl -m 5 http://$(kubectl get services | grep echo | awk '{ print $4 }'):80
- name: Deploy nginx
run: |
kubectl create deployment nginx --image=nginx --replicas=3
kubectl wait pod --all --for=condition=Ready -n default
kubectl expose deployment nginx --port=80 --target-port=8000 --name=nginx --type=LoadBalancer
kubectl get pods
kubectl get services
kubectl describe services nginx
kubectl get services | grep nginx | awk '{ print $4 }'
curl -m 5 http://$(kubectl get services | grep nginx | awk '{ print $4 }'):80
- name: Test LoadBalancer
run: |
cat <<EOF | kubectl apply -f -
Expand Down Expand Up @@ -151,19 +173,8 @@ jobs:
timeout 20s bash -c 'until kubectl get service/foo-service --output=jsonpath='{.status.loadBalancer}' | grep "ingress"; do : ; done'
kubectl get services
LB_IP=$(kubectl get svc/foo-service -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -m 5 ${LB_IP}:5678
curl -m 5 http://${LB_IP}:5678
- name: Deploy nginx
run: |
kubectl create deployment nginx --image=nginx --replicas=3
kubectl wait pod --all --for=condition=Ready -n default
kubectl expose deployment nginx --port=80 --target-port=8000 --name=nginx --type=LoadBalancer
kubectl get pods
kubectl get services
kubectl describe services nginx
kubectl get services | grep nginx | awk '{ print $4 }'
curl -m 5 $(kubectl get services | grep nginx | awk '{ print $4 }'):80
- name: Export logs
if: always()
run: |
Expand Down

0 comments on commit 23d64b8

Please sign in to comment.