2017-02-01 01:22:09 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: nginx-ingress-controller
|
|
|
|
labels:
|
2018-09-04 03:25:30 +00:00
|
|
|
app.kubernetes.io/name: ingress-nginx
|
|
|
|
app.kubernetes.io/part-of: ingress-nginx
|
2017-02-01 01:22:09 +00:00
|
|
|
spec:
|
|
|
|
replicas: 1
|
2018-02-07 16:50:12 +00:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2018-09-04 03:25:30 +00:00
|
|
|
app.kubernetes.io/name: ingress-nginx
|
|
|
|
app.kubernetes.io/part-of: ingress-nginx
|
2017-02-01 01:22:09 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2018-09-04 03:25:30 +00:00
|
|
|
app.kubernetes.io/name: ingress-nginx
|
|
|
|
app.kubernetes.io/part-of: ingress-nginx
|
2017-02-01 01:22:09 +00:00
|
|
|
spec:
|
|
|
|
# hostNetwork makes it possible to use ipv6 and to preserve the source IP correctly regardless of docker configuration
|
|
|
|
# however, it is not a hard dependency of the nginx-ingress-controller itself and it may cause issues if port 10254 already is taken on the host
|
|
|
|
# that said, since hostPort is broken on CNI (https://github.com/kubernetes/kubernetes/issues/31307) we have to use hostNetwork where CNI is used
|
|
|
|
# like with kubeadm
|
|
|
|
# hostNetwork: true
|
|
|
|
terminationGracePeriodSeconds: 60
|
|
|
|
containers:
|
2018-08-11 23:51:45 +00:00
|
|
|
- image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.18.0
|
2017-02-01 01:22:09 +00:00
|
|
|
name: nginx-ingress-controller
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: 10254
|
|
|
|
scheme: HTTP
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 1
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
hostPort: 80
|
|
|
|
- containerPort: 443
|
|
|
|
hostPort: 443
|
|
|
|
env:
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
args:
|
|
|
|
- /nginx-ingress-controller
|
|
|
|
- --publish-service=$(POD_NAMESPACE)/nginx-ingress-lb
|