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

Trouble connecting/accessing information from cluster #44

Open
vmarcel opened this issue Aug 30, 2017 · 3 comments
Open

Trouble connecting/accessing information from cluster #44

vmarcel opened this issue Aug 30, 2017 · 3 comments

Comments

@vmarcel
Copy link

vmarcel commented Aug 30, 2017

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?

@emanuelecasadio
Copy link

I am on Azure Container Service. I have tried using REST API with the three .pem files and it works like a charm.

@khaled-nabil
Copy link

Have you managed to get it to work? I am running through the same issue.

@emanuelecasadio
Copy link

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.

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

3 participants