-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pods restart loop with error "[emerg] 23#23: bind() to 0.0.0.0:80 failed (13: Permission denied)" in latest chart/version for daemonset #3932
Comments
Hi @brian-provenzano thanks for reporting! Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂 Cheers! |
2023/05/22 17:08:45 [emerg] 23#23: bind() to 0.0.0.0:80 failed (13: Permission denied)
in latest chart/version for daemonset
Hi @brian-provenzano, tested this on Nginx Ingress controller v3.1.1 on k8s 1.27:
can you please make sure if you're on correct release tag while running helm cmd used: |
Specifically, there is tuning to the netbind service in the patch https://docs.nginx.com/nginx-ingress-controller/releases/#nginx-ingress-controller-311 |
We run I will double check my work though to be sure and get back to you asap... |
OK - I tried with these images Testing process: I edited the ds on the cluster to use the Could this be some issue in how our nodes are configured? AMI, OS etc? We are using custom Ubuntu CIS AMIs and not the official AWS EKS optimized AMIs. Logs from a pod that successfully starts/runs once I change to
Logs from a pod when
|
We have had issues with Helm upgrades in the past where changes to rbac.yaml (or in openshift scc.yaml) is not processed properly due to how Helm performs the upgrade. I see that you are using a daemonset instead of a deployment.. |
OK - I will give that a try and report back - shouldn't take long to test |
Same issue - no change in behavior as deployment. Attached is a copy of the deployment. pod logs when deployed as a deployment (same as before):
Again if I change to
|
weird, working for me with default values on both GKE and AKS with helm chart=0.17.1
I'll try EKS with official EKS optimized Amazon Linux 2 instances later. |
Alright, I am starting to think it is something unique to our environment. I did the following:
One other possible variable here is our container runtime is still docker in 1.23, besides the fact we are not using official AWS EKS AMIs. I think the current EKS AMIs built for 1.23 use containerd...? Anyway, I am going to try another test on another one of our 1.23 clusters created using our IaC (TF not eksctl; our custom ubuntu AMI with docker runtime) to further test, but it appears to be an issue on my end. Sorry about the wild goose chase here :( I am guessing we can close this for now and I can report back if anything changes... |
It is fine to leave this until you resolve. I think we all learn from these kinds of things. |
Thanks @brian-provenzano for checking, I'll close this for now 👍🏼 |
We're running into the same error on |
@justbert we'll be adding option to modify securityContext in 3.5.0 via helm so that should solve your issue hopefully |
Found the issue! (I should have updated my comment) It seems Kaniko doesn't copy over extended file attributes whereas Docker does which means the NET_CAP_BIND was missing from the binary. It's not a well defined part of the COPY command which (as we can see) causes issues. |
Describe the bug
Using latest image and helm chart and upgrading from v2.4.2 I am getting permission denied errors in nginx pods which causes constant restarts. It appears the issue revolves around these recent securityContext changes PR 3722 and PR 3573.
To Reproduce
Steps to reproduce the behavior:
helm template
... thenkubectl apply
. - see sample values.yaml to see our settings.2023/05/22 17:08:45 [emerg] 23#23: bind() to 0.0.0.0:80 failed (13: Permission denied)
daemonset.spec.template.spec.containers.securityContext.allowPrivilegeEscalation
totrue
(current setting isfalse
in chart template) and restart the ds it works fine and pods start. This appears to be the same setting that was present in v.2.4.2 which we currently run without issue.Expected behavior
I expect the pods to start successfully even with the new securityContext in place.
Your environment
Additional context
I can provide more information if needed. I would adjust the
daemonset.spec.template.spec.containers.securityContext.allowPrivilegeEscalation
to false to fix this ourselves (albeit reverting to a previously less secure setup that was present in v.2.4.2), but that param is not configurable in the chart.v3.1.1 Images tried:
nginx/nginx-ingress:3.1.1-ubi
andpublic.ecr.aws/nginx/nginx-ingress:3.1.1-ubi
(but we use the aws ecr public image due to dockerhub throttles)test-values.yaml.txt
The text was updated successfully, but these errors were encountered: