Skip to content
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

The Pod is invalid: spec.containers[0].restartPolicy: Forbidden: may not be set for non-init containers #53

Open
kishor7007 opened this issue Sep 27, 2024 · 1 comment

Comments

@kishor7007
Copy link

kishor7007 commented Sep 27, 2024

Running kubectl exec-as -u root -n default -c istio-proxy -d sleep-db7f48c4-spbgw -- /bin/bash command throws below error
The Pod "kishor-1" is invalid: spec.containers[0].restartPolicy: Forbidden: may not be set for non-init containers

@kishor7007 kishor7007 changed the title The Pod "kishor-1" is invalid: spec.containers[0].restartPolicy: Forbidden: may not be set for non-init containers The Pod is invalid: spec.containers[0].restartPolicy: Forbidden: may not be set for non-init containers Sep 27, 2024
@dvglab
Copy link

dvglab commented Oct 23, 2024

The same issue for me:
kubectl exec-as -u root -n dev -c backend -d backend-77bffd84b-66hzg -- /bin/bash
The Pod "dvg-1" is invalid: spec.containers[0].restartPolicy: Forbidden: may not be set for non-init containers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants