Error unknown flag --bash See kubectl exec --help for usage

0 votes

Hi Guys,

I am trying to go inside my pod using exec command, but it shows me the below error.

$ kubectl exec -it jenkins-79d5f557df-k92zd --bash
Error: unknown flag: --bash
See 'kubectl exec --help' for usage.

How can I solve this error?

May 18, 2020 in Kubernetes by akhtar
• 38,260 points
5,357 views

1 answer to this question.

0 votes

Hi@akhtar,

You got this error because you missed one space before bash in your command. Use this below given command.

$ kubectl exec -it jenkins-79d5f557df-k92zd -- bash

Hope this will help.

answered May 18, 2020 by MD
• 95,460 points

Related Questions In Kubernetes

0 votes
2 answers

Kubernetes on AWS: “Error: unknown flag: --config”

Update the cluster.yaml, changing the line kubernetesVersion: v1.6.6_coreos.1 to kubernetesVersion: v1.7.10_coreos.0 Should ...READ MORE

answered Oct 4, 2018 in Kubernetes by Kalgi
• 52,350 points
2,526 views
0 votes
1 answer
0 votes
1 answer

Permission Error while GKE clusterrolebinding for cluster-admin

If your kubeconfig was created automatically by gcloud then ...READ MORE

answered Sep 3, 2018 in Kubernetes by ajs3033
• 7,300 points
4,254 views
+2 votes
1 answer
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,476 views
0 votes
1 answer

kubectl info: exec: fork/exec /usr/local/bin/kubectl: exec format error

Hi@akhtar, The most common reason for this error ...READ MORE

answered May 19, 2020 in Kubernetes by MD
• 95,460 points
8,397 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP