Install Minikube in Ubuntu

Minikube is an easy to use Kubernetes that run on one machine. It is used for testing purpose.

https://github.com/kubernetes/minikube

To install minikube, run

Before you can start minikube, you need to install VirtualBox, this can be done with command

To start minikube, run

To stop

To connect to minikube node

See minikube logs

Delete minikube

Mount a file system

See Kubernetes

Deploy MySQL Server in Kubernetes using Helm

To install MySQL server in Kubernetes, run

Once install is completed, you will get something like

To connect to this MySQL, you need to create a temporary Ubuntu server in Kubernetes as MySQL is only available inside the cluster.

To create a server, run

Install MySQL client inside this server with

To connect to MySQL, use the command provided after install, in my case

You can get password by running

You can list packages installed using helm with

To delete, run

Install WordPress in Kubernetes

To install WordPress in Kubernetes, you need to install helm package manager.

Now run

After the helm chart is run, you will get commands to get login for WordPress admin area.

Here is services it create

List of all pods

Deployments

To scale the deployment, run

See Helm Kubernetes Package Manager, Kubernetes

Helm Kubernetes Package Manager

Helm is Package Manager for Kubernetes. Helm packages are called “Charts”. Charts allow you to deploy various software on Kubernetes cluster.

https://helm.sh/

To install helm, run

If you are on Ubuntu, you can install from snap

To update helm repos, run

To deploy MySQL chart to Kubernetes, run

Install WordPress in Kubernetes
Deploy MySQL Server in Kubernetes using Helm

See Kubernetes

Google Kubernetes Engine

To list all Kubernetes clusters, run

To create a Kubernetes cluster, run

Get credential for kubectl

List all nodes (GCP instances)

Create Kubernetes cluser using gcloud

gcloud-container-clusers-create

Create Kubernetes cluser using gcloud

Login to gcloud with

Set default region

To create a cluser, run

To create a cluster with 2 nodes, run

To specify compute engine type during cluster creation, run

You can also specify scopes, this allow you to give the cluster permission to access other google cloud resources. For example to allow cluster access Cloud Source Repositories and Google Container Registry. run

To list your container, run

gcloud clusters

Before you can use cluser, you need to get authentication credentials with command

To interact with Kubernetes, you need kubectl, on Ubuntu, yu can install it with

To deploy a container, run

This will deploy google provided hello-app container to the cluser.

To make the application available to public, create a loadbalancer service.

Now find IP of the LoadBalacner service with command

From the result, we found EXTERNAL-IP for LoadBalancer is 35.232.226.216. To access the application, go to url


http://35.232.226.216:8080

See Kubernetes

Installing kubernetes master on Ubuntu 16.04

To install master on Ubuntu 16.04, lets start by installing docker.

Now install kubeadm

You can create kubernetes master by running kubeadmin init command.