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

51 lines
1012 B
YAML
Raw Normal View History

2021-06-18 18:39:35 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2021-06-18 19:08:53 +00:00
name: tls1
2021-06-18 18:39:35 +00:00
spec:
selector:
matchLabels:
2021-06-18 19:08:53 +00:00
app: tls1
2021-06-18 18:39:35 +00:00
replicas: 1
template:
metadata:
labels:
2021-06-18 19:08:53 +00:00
app: tls1
2021-06-18 18:39:35 +00:00
spec:
containers:
2021-06-18 19:08:53 +00:00
- name: nginx-80
image: nginx:1.20.0-alpine
2021-06-18 18:39:35 +00:00
ports:
2021-06-18 19:08:53 +00:00
- containerPort: 80
2021-06-18 18:39:35 +00:00
volumeMounts:
2021-06-18 19:08:53 +00:00
- 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/"
2021-06-18 18:39:35 +00:00
volumes:
2021-06-18 19:08:53 +00:00
- name: nginx-config-80
configMap:
name: nginx-80-config
- name: nginx-config-443
2021-06-18 18:39:35 +00:00
configMap:
2021-06-18 19:08:53 +00:00
name: nginx-443-config
2021-06-18 18:39:35 +00:00
---
apiVersion: v1
kind: Service
metadata:
2021-06-18 19:08:53 +00:00
name: tls1
2021-06-18 18:39:35 +00:00
labels:
2021-06-18 19:08:53 +00:00
app: tls1
2021-06-18 18:39:35 +00:00
spec:
type: ClusterIP
ports:
2021-06-18 19:08:53 +00:00
- port: 80
- port: 443
2021-06-18 18:39:35 +00:00
selector:
2021-06-18 19:08:53 +00:00
app: tls1-nginx