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

Create namespace? #72

Closed
rafaelrpinto opened this issue Feb 10, 2017 · 1 comment
Closed

Create namespace? #72

rafaelrpinto opened this issue Feb 10, 2017 · 1 comment

Comments

@rafaelrpinto
Copy link

Hi,
Does the client support namespace creation?
Thanks,
Rafael

@silasbw
Copy link
Contributor

silasbw commented Feb 10, 2017

Yes:

const K8sApi = require('kubernetes-client');
const k8s = new K8Api.Core({
  url: 'http://my-k8-api-server.com'
});

const namespace = {                                                                                                                                                                                                                      
  kind: 'Namespace',
  metadata: {
    name: 'foo1'
  }
};

k8s.ns.post({ body: namespace }, (err, results) => {
  console.log(err, results);
});

@silasbw silasbw closed this as completed Feb 10, 2017
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