Add test deployment for testen trafficpolicy

This commit is contained in:
Nico Schottelius 2022-05-10 19:37:14 +02:00
parent 4f19a2a6fb
commit 43246c258c
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: k8s.gcr.io/echoserver:1.4
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
type: NodePort
externalTrafficPolicy: Local
selector:
app: nginx
ports:
- protocol: TCP
port: 80
nodePort: 32077