minishift-up-role
minishift-up-role copied to clipboard
Switch kube context fails
Hi, following the Minishift setup guide i'm running into an error during execution of the playbook:
TASK [chouseknecht.minishift : Copy oc client] *********************************
ok: [localhost]
TASK [chouseknecht.minishift : Switch the kube config context] *****************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/oc config use-context /$(minishift ip | tr . -):8443/developer", "delta": "0:00:00.137669", "end": "2018-10-16 09:14:03.286365", "msg": "non-zero return code", "rc": 1, "start": "2018-10-16 09:14:03.148696", "stderr": "error: no context exists with the name: \"/192-168-42-198:8443/developer\".", "stderr_lines": ["error: no context exists with the name: \"/192-168-42-198:8443/developer\"."], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/home/steffen/minishift-up.retry
PLAY RECAP *********************************************************************
localhost : ok=43 changed=13 unreachable=0 failed=1
This is the output of oc config get-contexts
:
steffen@tecra-z50:~$ oc config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* minishift 192-168-42-198:8443 developer/192-168-42-198:8443 myproject
myproject/192-168-42-198:8443/developer 192-168-42-198:8443 developer/192-168-42-198:8443 myproject
myproject/192-168-42-198:8443/system:admin 192-168-42-198:8443 system:admin/192-168-42-198:8443 myproject
Looks to me that the contexts are simply named differently, maybe because of a version change? I'm running Ubuntu 18.04, Ansible 2.7.0 and Docker 18.06.1-ce Cheers,
Steffen
I've submitted a PR that resolves this issue #12