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

Switch kube context fails #10

Open
selste opened this issue Oct 16, 2018 · 1 comment
Open

Switch kube context fails #10

selste opened this issue Oct 16, 2018 · 1 comment

Comments

@selste
Copy link

selste commented Oct 16, 2018

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

@aacecandev
Copy link

aacecandev commented May 31, 2019

I've submitted a PR that resolves this issue #12

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

2 participants