Deploy containers from Node/Angular UI to K8s cluster

8/27/2019

I am working over a platform which offers a GUI for users to deploy their application on a K8s cluster. There is a limited set of applications/docker containers which is available to be deployed(pre-build images). GUI would give options to customize runtime settings for it.

Has anyone ever tried to access K8s cluster with a node/angular app? How to deploy a container from node app on k8s if it's possible by any chance? Can Helm be used?

Appreciate thoughts.

-- Nitish Bhardwaj
angular
docker
kubernetes
kubernetes-helm
node.js

1 Answer

8/27/2019

I would suggest using Kubernetes client libraries to deploy to Kubernetes.

https://kubernetes.io/docs/reference/using-api/client-libraries/

JavaScript client exists but Go client is battle-tested, (kubectl is written in Go)

You can create a wrapper around helm or an existing one such as https://github.com/adibenmat/node-helm but Kubernetes clients are better supported.

Bonus look at https://github.com/operator-framework

Here is an example blog post https://endaphelan.me/guides/kubernetes/invoking-the-kubernetes-api-in-node/

-- Tummala Dhanvi
Source: StackOverflow