Code Monkey home page Code Monkey logo

Comments (4)

wtschreiter avatar wtschreiter commented on September 23, 2024

Hi,

I try to investigate this problem and want to setup your scenario in our environment.

Could you please compare your ~/cattlectl.yaml and your ~/.rancher/cli2.json

If your ~/.rancher/cli2.json looks like (prettified):

{
  "Servers": {
    "rancherDefault": {
      "accessKey": "token-XXXXX",
      "secretKey": "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
      "tokenKey": "token-XXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY",
      "url": "https://ZZZZZZZZZZZZZZZZZZ",
      "project": "c-xxxxx:p-yyyyy",
      "cacert": ""
    }
  },
  "CurrentServer": "rancherDefault"
}

your ~/cattlectl.yaml needs to look like:

rancher:
  url: https://ZZZZZZZZZZZZZZZZZZ
  access_key: token-XXXXX
  secret_key: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
  cluster_id: c-xxxxx

could you please confirm this is the case?

from cattlectl.

jhoffmann avatar jhoffmann commented on September 23, 2024

Sorry @wtschreiter I was on vacation without access to my computer. I've verified that is the case:

$ cat ~/.cattlectl.yaml
rancher:
  url: https://XXXXXX-rancher.XXXXXXXX.net
  access_key: token-XXX2n
  secret_key: XXXXXXdxqlp5kgzjzfbh8nfv7lqg26nrvfmc2ltxqmqhw7vxmbf2t
  cluster_id: c-lmq2x
  insecure_api: true

$ cat ~/.rancher/cli2.json | jq
{
  "Servers": {
    "rancherDefault": {
      "accessKey": "token-XXX2n",
      "secretKey": "XXXXXXdxqlp5kgzjzfbh8nfv7lqg26nrvfmc2ltxqmqhw7vxmbf2t",
      "tokenKey": "token-XXX2n:XXXXXXdxqlp5kgzjzfbh8nfv7lqg26nrvfmc2ltxqmqhw7vxmbf2t",
      "url": "https://XXXXXX-rancher.XXXXXXXX.net",
      "project": "c-lmq2x:p-rxpkv",
      "cacert": "-----BEGIN CERTIFICATE-----\nMIIEizCXXXXXX+f78Xf7\n-----END CERTIFICATE-----"
    }
  },
  "CurrentServer": "rancherDefault"
}

from cattlectl.

jhoffmann avatar jhoffmann commented on September 23, 2024

So I found the issue. In my .bash_profile I had old API keys defined, which were taking precedence over whatever I put into .cattlectl.yaml.

from cattlectl.

wtschreiter avatar wtschreiter commented on September 23, 2024

Good to hear.
Thanks for keeping me informed

from cattlectl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.