Files
blog-manifest/deployments/nginx-ingress-deployment.yaml
2023-01-27 15:28:28 -08:00

78 lines
2.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-ingress-controller
namespace: blog
spec:
replicas: 1
selector:
matchLabels:
app: nginx-ingress-controller
template:
metadata:
labels:
app: nginx-ingress-controller
spec:
serviceAccountName: nginx-ingress-service-account
containers:
- name: nginx-ingress-controller
image: nginx/nginx-ingress:latest
args:
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --enable-ssl-passthrough
- --enable-vts-status
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --annotations-prefix=nginx.ingress.kubernetes.io
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
limits:
cpu: "200m"
memory: "512Mi"
requests:
cpu: "100m"
memory: "256Mi"
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
livenessProbe:
httpGet:
path: /healthz
port: 10254
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /healthz
port: 10254
initialDelaySeconds: 30
timeoutSeconds: 5
volumeMounts:
- name: config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
- name: ssl-certs
mountPath: /etc/nginx/ssl
- name: default-backend
mountPath: /etc/nginx/default.d
volumes:
- name: config
configMap:
name: nginx-config
- name: ssl-certs
secret:
secretName: nginx-ssl-certs
- name: default-backend
configMap:
name: nginx-default-backend