kubernetes-pod-auth
v1.0.0
Published
Get auth token and ca certificates from within a kubernetes pod
Downloads
7
Maintainers
Readme
kubernetes-pod-auth
Get auth token and ca certificates from within a kubernetes pod
In order to use kubernetes apis from withing a pod you'll need to authenticate with a service account.
Kubernetes places a credential (token) in every container filesystem, along with a certificate bundle for https calls (see more here).
This pluing helps you easly get them. You can thant use them with any kubernetes api package or for raw https requests
Install
npm install kubernetes-pod-auth --save
Usage
var getCredentials = require('kubernetes-pod-auth')
getCredentials(function (err, ca, token) {
console.log(err, ca, token)
})
License
MIT
Acknowledgements
Maintainer - Paolo Chiodi
This project was kindly sponsored by nearForm.