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

Context was not found for specified context #110

Closed
CezarManea opened this issue Apr 16, 2021 · 5 comments
Closed

Context was not found for specified context #110

CezarManea opened this issue Apr 16, 2021 · 5 comments

Comments

@CezarManea
Copy link

CezarManea commented Apr 16, 2021

Latest version of ksniff (v1.6.0) does not work with KUBECONFIG environment variable that was multiple config files.
All works of with a single config file or the first config file in the list.
kubectl works ok and also kubectl config view looks ok.

➜ kubectl sniff demo -n default
Error: invalid configuration: [context was not found for specified context: minikube, cluster has no server defined]
@bostrt
Copy link
Collaborator

bostrt commented Apr 18, 2021

Hi @CezarManea,

Thanks for reporting this issue. I see the same thing on my side. We'll have to rework how the kubeconfig is loaded to address this. I'll submit a PR and it should be included in next release of ksniff.

@mrszop
Copy link

mrszop commented Jul 16, 2021

Hey,

is this issue still open? I'm getting the same message after todays installation:

~/Doc/c/bab/15/szop/elasticsearch on elasticsearch ❯ kubectl krew info sniff
NAME: sniff
INDEX: default
URI: https://github.com/eldadru/ksniff/releases/download/v1.6.0/ksniff.zip
SHA256: 513b04c6a63a287e9566c28a9d72fdd8d06c6aa0ab8eb30e5303923c97701ab8
VERSION: v1.6.0
HOMEPAGE: https://github.com/eldadru/ksniff
DESCRIPTION: 
When working with micro-services, many times it's very helpful to get a capture of the network
activity between your micro-service and it's dependencies.

ksniff use kubectl to upload a statically compiled tcpdump binary to your pod and redirecting it's
output to your local Wireshark for smooth network debugging experience.

CAVEATS:
\
 | This plugin needs the following programs:
 | * wireshark (optional, used for live capture)
/
/Users/szop/.krew/bin/kubectl-sniff elasticsearch-master-0 -n elasticsearch

Error: invalid configuration: [context was not found for specified context: admin@szop/staging, cluster has no server defined]

Cheers

@shibumi
Copy link

shibumi commented Sep 16, 2021

Hi,
I get the same error .. looks like this is still open :(

@wd
Copy link

wd commented Jan 29, 2022

a workaround for this is to run the command like this KUBECONFIG=path/to/the/file kubectl sniff xx

@bcouetil
Copy link

I just experienced the problem too, and was searching for a fix. Thank you for the workaround !

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

6 participants