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 in Kubernetes by akhtar
• 11,250 points
36 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 by MD
• 24,500 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
• 51,850 points
433 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,280 points
1,516 views
0 votes
1 answer
0 votes
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
6,640 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 in Kubernetes by MD
• 24,500 points
47 views