I tried opening a terminal from Jupyter and running my example from the command-line there - this works fine also.
On Sunday, May 14, 2017 at 6:05:06 AM UTC+2, Michael Bright wrote: > > > Here's a question I asked just now in the kubernetes-sig-apps group, but > as it's Jupyter related, maybe someone here has an idea ... > > > I tried using kubernetes-incubator/client-python from within Jupyter.and > was unable to get a *very* simple example working. > > I'm running kubernetes (client-python v 2.0.0), Minikube v0.19, Anaconda > Python 4.3.17, Python 3.6.1, Jupyter notebook 5.0. > > When I run the following example from the command-line, it works fine:(yes > it's using the same version of Anaconda Python) > from kubernetes import client, config > > config.load_kube_config() > > v1 = client.CoreV1Api() > print(v1.list_namespace()) > > When I run the example from within Jupyter I get connection refused. > > It seems that v1.api_client.host is set to > 192.168.99.100:8443 when run from the command-line > 127.0.0.1:8080 when run from Jupyter > > After several hours of playing with this I now have a workaround which is > to run > kubectl proxy --port=8080 > in another terminal. > > I'd really like to avoid that workaround so that my notebook is self > contained. > > As far as I can tell my shell ernvironment is identical between Jupyter > and the command-line. > > Any idea what I need to do to fix this? > > > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/772e3546-a66e-4f81-8477-d8a35bbad4ee%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
