Kubernetes javascript API client - cloud function and Kubectl run

2/1/2019

I'm using Google Kubernetes Engine and want to fire a Pod thanks to Google Cloud Functions.

Create and deploy one when needed.

I'm looking for a way to imitate the "kubectl run" command.

I found Kubernetes clients but can't identify the correct method / api.

JavaScript-Client

Any ideas ?

-- xikimay
google-cloud-functions
google-kubernetes-engine
kubectl

1 Answer

2/1/2019

Since you are using Google Cloud Functions, I guess you can refer to the API Client Library for Javascript and use the Kubernetes Engine API, v1 scope. If you prefer to make requests to the master endpoint, refer to the Kubernetes API Documentation

-- ozrlz
Source: StackOverflow