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 71541f8 commit 50649a0
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,51 @@ jobs:
namespace: metallb-system
EOF
- name: Test LoadBalancer
run: |
cat <<EOF | kubectl apply -f -
kind: Pod
apiVersion: v1
metadata:
name: foo-app
labels:
app: http-echo
spec:
containers:
- name: foo-app
image: hashicorp/http-echo:0.2.3
args:
- "-text=foo"
---
kind: Pod
apiVersion: v1
metadata:
name: bar-app
labels:
app: http-echo
spec:
containers:
- name: bar-app
image: hashicorp/http-echo:0.2.3
args:
- "-text=bar"
---
kind: Service
apiVersion: v1
metadata:
name: foo-service
spec:
type: LoadBalancer
selector:
app: http-echo
ports:
# Default port used by the image
- port: 5678
EOF
kubectl wait pod --all --for=condition=Ready -n default
LB_IP=$(kubectl get svc/foo-service -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -m 5 ${LB_IP}:5678
- name: Deploy nginx
run: |
kubectl create deployment nginx --image=nginx --replicas=3
Expand Down

0 comments on commit 50649a0

Please sign in to comment.