ingress-nginx: Ingress controller not starting
NGINX Ingress controller version: 0.18.0
Kubernetes version (use kubectl version
): v1.11.1
Environment:
- Cloud provider or hardware configuration: HW
- OS (e.g. from /etc/os-release): Ubuntu 18.04.1
- Kernel (e.g.
uname -a
): 4.15.0-29
What happened: After upgrade controller from 0.17.1 to 0.18.0 it`s not started and wrote in logs:
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: 0.18.0
Build: git-7b20058
Repository: https://github.com/kubernetes/ingress-nginx.git
-------------------------------------------------------------------------------
nginx version: nginx/1.15.2
W0827 09:10:13.940665 9 client_config.go:552] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0827 09:10:13.940907 9 main.go:191] Creating API client for https://10.96.0.1:443
I0827 09:10:13.982783 9 main.go:235] Running in Kubernetes cluster version v1.11 (v1.11.1) - git (clean) commit b1b29978270dc22fecc592ac55d903350454310a - platform linux/amd64
I0827 09:10:14.002798 9 main.go:100] Validated ingress-nginx/default-http-backend as the default backend.
I0827 09:10:14.153962 9 nginx.go:255] Starting NGINX Ingress controller
ResourceVersion:"2636042", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress kube-system/dashboard
I0827 09:10:15.263295 9 backend_ssl.go:68] Adding Secret "kube-system/wild" to the local store
I0827 09:10:15.263483 9 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"consent", UID:"250ae80d-9aee-11e8-8514-a4bf012da507", APIVersion:"extensions/v1beta1", ResourceVersion:"2636043", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress default/consent
I0827 09:10:15.264786 9 event.go:221] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"default", Name:"static-content", UID:"fe34ea2d-a52d-11e8-8514-a4bf012da507", APIVersion:"extensions/v1beta1", ResourceVersion:"3058967", FieldPath:""}): type: 'Normal' reason: 'CREATE' Ingress default/static-content
I0827 09:10:15.354651 9 nginx.go:684] Starting TLS proxy for SSL Passthrough
F0827 09:10:15.354735 9 nginx.go:696] listen tcp :443: bind: permission denied
How to reproduce it (as minimally and precisely as possible): Config:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-ingress-controller
namespace: ingress-nginx
spec:
replicas: 1
selector:
matchLabels:
app: ingress-nginx
template:
metadata:
labels:
app: ingress-nginx
annotations:
prometheus.io/port: '10254'
prometheus.io/scrape: 'true'
spec:
serviceAccountName: nginx-ingress-serviceaccount
containers:
- name: nginx-ingress-controller
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.18.0
args:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --configmap=$(POD_NAMESPACE)/nginx-configuration
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
- --publish-service=$(POD_NAMESPACE)/ingress-nginx
- --annotations-prefix=nginx.ingress.kubernetes.io
- --enable-ssl-passthrough
securityContext:
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE
# www-data -> 33
runAsUser: 33
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10254
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
---
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
data:
client-body-buffer-size: 32M
hsts: "true"
proxy-body-size: 1G
proxy-buffering: "off"
proxy-read-timeout: "600"
proxy-send-timeout: "600"
server-tokens: "false"
ssl-redirect: "false"
upstream-keepalive-connections: "50"
use-proxy-protocol: "false"
Anything else we need to know:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 28 (5 by maintainers)
@OrlinVasilev we release every three or four weeks. Next release should be in a week or two Please check https://github.com/kubernetes/ingress-nginx/projects/27
Me also. Similar issue in on Ubuntu 18.04.2 with nginx-ingress version 0.23.0 the stable repo of helm. [git-be1329b22]. Tried with 0.22.0 - same issue. Tried with latest as well - 0.24.1, and same issue. Docker engine is configured with overlay2, and using extfs.
kube-system nginx-ingress-controller-f44c6f76b-q7srb 0/1 CrashLoopBackOff 9 16m
Logs: E0510 23:46:11.181961 6 controller.go:184] Unexpected failure reloading the backend:
Error: exit status 1 2019/05/10 23:46:11 [notice] 42#42: ModSecurity-nginx v1.0.0 nginx: the configuration file /tmp/nginx-cfg596781409 syntax is ok 2019/05/10 23:46:11 [emerg] 42#42: bind() to 0.0.0.0:80 failed (13: Permission denied) nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) nginx: configuration file /tmp/nginx-cfg596781409 test failed
Any suggestion ?
@OrlinVasilev already done here #3038 (part of 0.20)
To all the affected users by this issue, please use
quay.io/kubernetes-ingress-controller/nginx-ingress-controller-amd64:fix-tcp-udp
I am also seeing the bind error with 0.18.0 on GKE. Rolling back to 0.17.1 fixes it.
For my case i had to add these 2 parameters in the deployments to get it to work:
–enable-ssl-chain-completion=false –enable-ssl-passthrough
Strange, for me it worked fine in 0.22.0, but I started getting this issue in 0.23.0.
Logs:
EDIT: My issue is 99,9% related to #3858.
EDIT 2: I tried running as root (
runAsUser: 0
), but that just gave me another issue that’s mentioned in #3589, which I can’t seem to figure out:I cant use that tag