Self-hosting Kubernetes on cloud

  1. For me, as a guy coming from science and later on data science background. I am naturally interested in data science applications and hence I wanted to orchestrate my own spark application or Jupyter notebook.
  2. I want to work wherever I am and my own cloud platform to allows me work anywhere, less risk in case my lap top breaks.

Set up the virtual machines

We need 1 control plan (the commander who gives order to other minion workers) and 2 worker virtual machines. Rememeber that the control plane requires 2 VCPU at least or there will be problems with the configuration files and cannot proceed. The worker virtual machines (nodes) can have only 1 VCPU. On digital ocean, the control plane cost 10 USD per month and the 2 worker also cost 10 USD per month. While the minimum charge to use the Digital Ocean (DO) managed kubernetes clusters will cost at least 40 USD per month. Half price for self managed.

“Helm” as a deployment/ pod installation/ management tool

Again, the books method to install the dashboard using helm and till is outdated. till is already deprecated and helm will do the job since helm 3.0. In order to install helm, run at the control plane to download helm’s installation script:

cat>role-bind-admin.yaml<<EOFapiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:  name: admin-userroleRef:  apiGroup: rbac.authorization.k8s.io  kind: ClusterRole  name: cluster-adminsubjects:- kind: ServiceAccount  name: admin-user  namespace: kube-systemEOF

Installing ingress-nginx

Common pitfall, when googling, you are likely to mix up between ingress-nginx and nginx-ingress and the premium version nginx-ingress-plus

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store