I really like the new rancher-cli (https://github.com/rancher/cli) and have been playing around with the pre-release. I noticed that the github page doesn’t have an issues section and looking through the forums there isn’t much information.
Will this repo have an issues section after it’s first release so we can submit any bugs we may find?
I’ve run into a few issues, or maybe I’m just not understanding how the cli works and will post them here as well (using https://github.com/rancher/cli/releases/tag/v0.0.1)
I created an Account API Key for account which has access to all our environments. However, when I set the RANCHER* env vars to keys and endpoint displayed in the GUI (RANCHER_URL=https://rancher.mycompany.com/v1), and then try to list available environments nothing comes back.
./rancher env ls
ID NAME ORCHESTRATION STATE CREATED
When troubleshooting the first issue with listing environments, I used the --env flag to specify and environment, which works
./rancher --env 1a2668 hosts
ID HOSTNAME STATE IP DETAIL
1h160 ip-10-10-1-135.mycompany.com active 10.10.1.135
1h161 ip-10-10-3-194.mycompany.com active 10.10.3.194
1h162 ip-10-10-3-193.mycompany.com active 10.10.3.193
1h163 ip-10-10-1-134.mycompany.com active 10.10.1.134
but trying to use the actual environment name, or a “fuzzy” match that was described in the recent Rancher Meetup, it doesn’t work,
🐳 ./rancher --env development hosts FATA Failed to find the current environment
- Another issue I ran into, which isn’t a Rancher thing, but a Docker thing, is when running with a newer version of Docker on the system rancher-cli is on than what’s on your Rancher cluster, it gives something akin to:
Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.22)
This is fixed by changing your local environment to match the server API version,
I’m not sure if that is something that can be handled within the rancher-cli or if it should be added to the general documentation on using it.