You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3s/tests/e2e/amd64_resource_files/loadbalancer-intTrafficPol....

64 lines
1.2 KiB

---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
default.conf: |
server {
listen 80;
location /ip {
return 200 "$remote_addr\n";
}
# Default location block to serve the default "Welcome to nginx" page
location / {
root /usr/share/nginx/html;
index index.html;
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-loadbalancer-int
spec:
selector:
matchLabels:
k8s-app: nginx-app-loadbalancer-int
replicas: 1
template:
metadata:
labels:
k8s-app: nginx-app-loadbalancer-int
spec:
containers:
- name: nginx
image: ranchertest/mytestcontainer
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config-volume
mountPath: /etc/nginx/conf.d
volumes:
- name: nginx-config-volume
configMap:
name: nginx-config
---
apiVersion: v1
kind: Service
metadata:
name: nginx-loadbalancer-svc-int
labels:
k8s-app: nginx-app-loadbalancer-int
spec:
type: LoadBalancer
internalTrafficPolicy: Local
ports:
- port: 83
targetPort: 80
protocol: TCP
name: http
selector:
k8s-app: nginx-app-loadbalancer-int