Manage Nodeless Kubernetes clusters with Nirmata
Nodeless Kubernetes is a cloud-native, simple, secure, cost-effective way to consume Kubernetes on public cloud. The Nirmata Platform is a unified Kubernetes management plane that provides self-service DevOps and complete lifecycle management and operations of Kubernetes workloads and clusters. The Nirmata Platform is a great fit for consuming Nodeless Kubernetes in a seamless, secure, simple manner. This blog illustrates how to consume Nodeless Kubernetes via Nirmata.
Step 1: Create 1-worker Nodeless Kubernetes cluster
Follow instructions in this repo to create a {1 master, 1 worker} Nodeless Kubernetes cluster.
Log on to Kubernetes master, verify cluster is up.
$ ssh -i "myechuri-key2.pem" ubuntu@100.26.23.126
$ kubectl cluster-info
Kubernetes master is running at https://10.0.23.147:6443
KubeDNS is running at https://10.0.23.147:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ip-10-0-20-188.ec2.internal Ready worker 28d v1.16.1 10.0.20.188 54.227.45.93 Ubuntu 16.04.6 LTS 4.4.0-1092-aws containerd://1.2.6
ip-10-0-23-147.ec2.internal Ready master 28d v1.16.1 10.0.23.147 100.26.23.126 Ubuntu 16.04.6 LTS 4.4.0-1092-aws docker://18.9.7
Step 2: Import Nodeless cluster into Nirmata
Go to Nirmata Dashboard and initiate Create Cluster
workflow.
Select Managing an existing Kubernetes Cluster
option.
Fill in cluster Name
and set Cloud Provider
to Amazon Web Services
.
Download nirmata-kube-controller.yaml
.
Scp nirmata-kube-controller.yaml
to a node with kubeconfig
access to Nodeless cluster.
$ scp -i myechuri-key2.pem /Users/myechuri/Downloads/nirmata-kube-controller.yaml ubuntu@100.26.23.126:/home/ubuntu/nirmata/
Apply nirmata-kube-controller.yaml
.
$ kubectl create -f nirmata-kube-controller.yaml
namespace/nirmata created
serviceaccount/nirmata created
clusterrole.rbac.authorization.k8s.io/nirmata:cluster-admin created
clusterrolebinding.rbac.authorization.k8s.io/nirmata-cluster-admin-binding created
deployment.apps/nirmata-kube-controller created
Fun fact: Nirmata-kube-controller pod will run in a Nodeless compute cell!
Verify that Nirmata namespace components are up and running.
$ kubectl get all -n nirmata
NAME READY STATUS RESTARTS AGE
pod/nirmata-kube-controller-859c54dd97-wdn48 1/1 Running 0 3m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nirmata-kube-controller 1/1 1 1 3m
NAME DESIRED CURRENT READY AGE
replicaset.apps/nirmata-kube-controller-859c54dd97 1 1 1 3m
On Nirmata dashboard, click I have installed the Nirmata Kubernetes Cluster
.
Your Nodeless k8s cluster is now fully managed by Nirmata!
Step 3: Deploy Nginx workload, manage via Nirmata dashboard
Deploy Nginx deployment with 3 replicas.
$ wget https://raw.githubusercontent.com/elotl/nodeless-nirmata/master/nginx.yaml
$ kubectl create -f nginx.yaml
All 3 replicas of Nginx will be deployed in a Nodeless fashion — just-in-time, right-sized, cost-effective compute will be started for each of the replicas, and the pods will be dispatched to the compute cells.
Nginx pods can be visualized through Nirmata dashboard.
Teardown
Follow teardown instructions from kubeadm repo.
Summary
Nirmata and Nodeless provide a compelling solution to increase your cloud efficiency and reduce costs! Nodeless extends the powerful Nirmata Kubernetes management platform to optimize the use of cloud resources and enable advanced hybrid cloud use cases with a single control plane.
References
Originally published at http://github.com.