Deploying Canonical Kubernetes Kubectl using juju and conjure-up I ran into a little issue after deployment.
$ kubectl get nodes
The connection to the server localhost:8080 was refused – did you specify the right host or port?
Well of course I didn’t, because that should have been done for me. But what should the fix be? Well after a few head scratching minutes, a walk outside for coffee, more frustrations, reading forums which didn’t help, and then an article on Scarlet Johansson’s Ghost in the Shell (which let me just say I have a lot to say about this), it hit me!
In the “/.kube” folder there is a configuration file called “config-conjure..blah-blah” and all the configuration information include keys are there. So what’s the deal? Oh I know, “kubectl” is looking for a file called “config”.
so “cp ‘config-conjure-blah-blah’ config”
i.e. Create copy the contents of the configuration file created by conjure-up and name it “config” and kubectl will use that file to connect to the node master. Now that there is a file called “config” everything works. Too bad I had nobody to smack.
$kubectl get node
Thanks for nothing Obama!