Skip to content

Conversation

@aknot242
Copy link
Contributor

Proposed changes

Problem: Deprecation warning from kubectl when using exec without the --

❯ kubectl exec -it -n nginx-gateway $NGINX_POD -c nginx /bin/sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
E0710 07:52:34.700510   45075 websocket.go:296] Unknown stream id 1, discarding message
/ $

Solution:

add the -- syntax before the command to be executed

Testing:

❯ kubectl exec -it -n nginx-gateway $NGINX_POD -c nginx -- /bin/sh
/ $ 

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #2217

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


@aknot242 aknot242 requested review from a team as code owners July 10, 2024 12:20
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 10, 2024
@aknot242
Copy link
Contributor Author

Thanks @sjberman and @mjang. What is the process to get this merged? I don't have merge permissions.

@kate-osborn
Copy link
Contributor

Thanks @sjberman and @mjang. What is the process to get this merged? I don't have merge permissions.

We can merge @aknot242. Thanks for the fix!

@kate-osborn kate-osborn merged commit 0edd3a8 into nginx:main Jul 10, 2024
@kate-osborn kate-osborn mentioned this pull request Aug 16, 2024
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Problem: Troubleshooting guide contains a deprecated kubectl command  syntax.

Solution: Fix the kubectl command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubectl exec deprecation warning in troubleshooting document

4 participants