ungleich-k8s/apps/nginx-certbot/base/deployment.yaml

51 lines
1012 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: tls1
spec:
selector:
matchLabels:
app: tls1
replicas: 1
template:
metadata:
labels:
app: tls1
spec:
containers:
- name: nginx-80
image: nginx:1.20.0-alpine
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config-80
mountPath: "/etc/nginx/conf.d/"
- name: nginx-443
image: nginx:1.20.0-alpine
ports:
- containerPort: 443
volumeMounts:
- name: nginx-config-443
mountPath: "/etc/nginx/conf.d/"
volumes:
- name: nginx-config-80
configMap:
name: nginx-80-config
- name: nginx-config-443
configMap:
name: nginx-443-config
---
apiVersion: v1
kind: Service
metadata:
name: tls1
labels:
app: tls1
spec:
type: ClusterIP
ports:
- port: 80
- port: 443
selector:
app: tls1-nginx