question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work with my kubeconfig file.

See original GitHub issue
apiVersion: v1
kind: Config
clusters:
- name: "xxxx-cluster7"
  cluster:
    server: "https://xxxxx.com/k8s/clusters/c-hkpbf"

users:
- name: "xxxx-cluster7"
  user:
    token: "kubeconfig-user-swrnv:*******************************************************"


contexts:
- name: "xxxx-cluster7"
  context:
    user: "xxxx-cluster7"
    cluster: "xxxx-cluster7"

current-context: "xxxx-cluster7"

After selecting option 2 (configfile) -> default, it gives me HTTPS URL to select and then it fails. saying input is not valid.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vasantchinnipillicommented, Dec 22, 2020

Hi @anjuls ,

Just tested on a few clusters and it Seems to be working as expected.

You may have to try with the actual Kubernetes cluster EndPoint.

0reactions
anjulscommented, Dec 22, 2020
(env) xxx@xxx:~/learning/kubestrike/kubestrike$ curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure
{
  "kind": "APIVersions",
  "versions": [
    "v1"
  ],
  "serverAddressByClientCIDRs": [
    {
      "clientCIDR": "0.0.0.0/0",
      "serverAddress": "ip-xxxxx.us-west-2.compute.internal:443"
    }
  ]
(env) xxx@xxx:~/learning/kubestrike/kubestrike$ python -m kubestrike 

  ###########################################################################
  ______          __         __                    __       _ __          __  
  \ \ \ \        / /____  __/ /_  ___        _____/ /______(_) /_____     \ \ 
   \ \ \ \______/ //_/ / / / __ \/ _ \______/ ___/ __/ ___/ / //_/ _ \_____\ \
   / / / /_____/ ,< / /_/ / /_/ /  __/_____(__  ) /_/ /  / / ,< /  __/_____/ /
  /_/_/_/     /_/|_|\__,_/_.___/\___/     /____/\__/_/  /_/_/|_|\___/     /_/ 
                                                                              

  ###########################################################################   v1.0.0

[+] Gearing up Kube-Strike......................................................

Choose one of the below options: (Use arrow keys)
Enter the target K8s Endpoint : ip-xxxx.us-west-2.compute.internal:443
 ---------------------------------------
< Target is neither reachable nor valid >
 ---------------------------------------
          \  ^__^
           \ (oo)\________
             (__)\        )\/\
                  ||----W |
                  ||     ||
Read more comments on GitHub >

github_iconTop Results From Across the Web

`--kubeconfig` doesn't work · Issue #41 - GitHub
Hi, passing a custom kubeconfig file path via --kubeconfig doesn't work. Setting KUBECONFIG env var works. For example: Doesn't work: .
Read more >
Can not find kubeconfig file - Stack Overflow
In my case I had KUBECONFIG variable set to "~/.kube/config" in .bashrc. The file existed & had correct permissions yet it wasn't being ......
Read more >
Organizing Cluster Access Using kubeconfig Files - Kubernetes
Use kubeconfig files to organize information about clusters, users, namespaces, and authentication mechanisms. The kubectl command-line tool ...
Read more >
Config file isn't available when connecting - Azure
Solution: Move the config file, save the credentials again, or change the KUBECONFIG environment variable · Modify the KUBECONFIG environment ...
Read more >
Kubeconfig File - Rancher Docs
A kubeconfig file is a file used to configure access to Kubernetes when used in conjunction with the kubectl commandline tool (or other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found