Skip to content

Momnt-Technologies/kubectl-provider

 
 

Repository files navigation

Kubectl Provider

This CDK construct creates a Lambda function capable of making arbitrary kubectl calls against a cluster.

Example

const app = new App();
const stack = new Stack(app, 'TestingFunctionStack', { env: { account: '...', region: '...' } });
const vpc = Vpc.fromLookup(stack, 'Vpc', { vpcId: '...' });
new KubectlFunction(stack, 'TestFunction', {
  vpc,
  roleArn: 'arn:aws:iam::0123456789012:role/ProxyKubectlRole360249B6-1GR9RPOPQW2E1',
  clusterName: 'dev',
});

Executing

To execute the Lambda function, hand it a basic commands field:

{
  "commands": ["get", "nodes", "-o", "json"]
}

About

A microservice for making kubectl calls against a cluster

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.7%
  • Python 30.3%
  • JavaScript 11.0%