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

Update README.md to included -c flag #12542

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

anselmobattisti
Copy link
Contributor

@anselmobattisti anselmobattisti commented Nov 16, 2024

Description

The -c flag in the kubectl exec command specifies which container in a pod you want to execute the command against. This is necessary when a pod has multiple containers, and you need to indicate which container should run the command.

If the -c flag is not passed, the command is executed, however a messagem is popupd, and in automated scripts it invalidade the processo.

The adition of -c will not affect the manual usage and will prevent erros in some automation process.

Summary
Use -c when the pod has multiple containers.
It ensures you are executing the command in the correct container. Helps avoid unexpected behavior or errors when Kubernetes defaults to the wrong container.

Issue link

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionality
  • Documentation
  • Refactoring
  • CI

The -c flag in the kubectl exec command specifies which container in a pod you want to execute the command against. This is necessary when a pod has multiple containers, and you need to indicate which container should run the command.

If the -c flag is not passed, the command is executed, however a messagem is popupd, and in automated scripts it invalidade the processo.

The adition of -c will not affect the manual usage and will prevent erros in some automation process.

Summary
Use -c when the pod has multiple containers.
It ensures you are executing the command in the correct container.
Helps avoid unexpected behavior or errors when Kubernetes defaults to the wrong container.

Signed-off-by: Anselmo Battisti <[email protected]>
Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@NikitaSkrynnik Could you also have a look?

@denis-tingaikin denis-tingaikin merged commit f6241e5 into networkservicemesh:main Nov 22, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants