node-k8s-client
node-k8s-client copied to clipboard
Trouble connecting/accessing information from cluster
Hello, I am trying to use this package to connect to Google Container Engine, which uses kubernetes. The issue is I am unsure why I am getting either no value or undefined when I am trying to get a simple list of the pods. here is my config:
var kubectl = k8s.kubectl({
endpoint: 'https://[cluser ip]',
namespace: 'default',
binary: '/usr/local/bin/kubectl',
auth: {
username: '[user]',
password: '[pass]'
}
})
How I am calling the function:
kubectl.pod.list(function (err, pods) {
console.log(pods)
})
any reason why I this is not working?
I am on Azure Container Service. I have tried using REST API with the three .pem files and it works like a charm.
Have you managed to get it to work? I am running through the same issue.
Yes, I got it working but now I don't use it anymore. However, I extracted the three .pem files from the ~/.azure
or ~/.kube
directory (they were encoded in base64 within a configuration file, if I can remember) and just used those files to access the cluster.