Google Kubernetes Engine Node Pools

In Google Kubernetes Engine, Nodes are Google Complete Engine (Virtual Machiens). Pods run inside Nodes. A Kubernetes cluster can contain multiple node pools. A node pool contain multiple nodes of same instance type. To create a Node Pool in Google Kubernetes Engine, run gcloud container node-pools create POOL_NAME \ –cluster=CLUSER_NAME \ –machine-type=e2-standard-2 \ –num-nodes=1 \ … Read more

Google Kubernetes Engine get credentials

Before you can run kubectl commands on Google Kubernetes Engine, you need to get credentials, this is done with command gcloud container clusters get-credentials CLUSER_NAME_HERE –zone ZONE_HERE To use gcloud commands, you need to login to google cloud first using command gcloud auth login See Google Kubernetes Engine

Install Minikube in Ubuntu

Minikube is an easy-to-use Kubernetes that run on one machine. It is used for testing purposes. https://github.com/kubernetes/minikube Install Minikube with docker driver on Ubuntu To install minikube, run wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo mv minikube-linux-amd64 /usr/local/bin/minikube sudo chmod 755 /usr/local/bin/minikube Before you can start minikube, you need to install VirtualBox, this can be done with the command … Read more

Deploy MySQL Server in Kubernetes using Helm

To install MySQL server in Kubernetes, run helm install stable/mysql Once install is completed, you will get something like NOTES: MySQL can be accessed via port 3306 on the following DNS name from within your cluster: incendiary-monkey-mysql.default.svc.cluster.local To get your root password run: MYSQL_ROOT_PASSWORD=$(kubectl get secret –namespace default incendiary-monkey-mysql -o jsonpath=”{.data.mysql-root-password}” | base64 –decode; echo) … Read more

Install WordPress in Kubernetes

To install WordPress in Kubernetes, you need to install helm package manager. Now run helm install stable/wordpress After the helm chart is run, you will get commands to get login for WordPress admin area. Here is services it create boby@sok-01:~$ kubectl get service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.39.240.1 443/TCP 34m whopping-labradoodle-mariadb … Read more

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 curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh bash get_helm.sh If you are on Ubuntu, you can install from snap snap install helm –classic To update helm repos, run helm repo update To … Read more

Google Kubernetes Engine

Create Kubernetes cluser using gcloud Google Kubernetes Engine get credentials Google Kubernetes Engine Node Pools To list all Kubernetes clusters, run gcloud container clusters list To create a Kubernetes cluster, run gcloud container clusters create CLUSTER_NAME Get credential for kubectl gcloud container clusters get-credentials CLUSTER_NAME List all nodes (GCP instances) kubectl get nodes

Create Kubernetes cluser using gcloud

Login to gcloud with gcloud auth login Set default region gcloud config set compute/zone us-central1-a To create a cluser, run gcloud container clusters create CLUSTER-NAME To create a cluster with 2 nodes, run gcloud container clusters create CLUSTER-NAME –num-nodes 2 To specify compute engine type during cluster creation, run gcloud container clusters create CLUSTER-NAME –num-nodes … Read more

Kubernetes

Easy Kubernetes setup on Ubuntu with microk8s Kubeapps https://kubernetes.io/docs/tutorials/hello-minikube/ Install Minikube in Ubuntu kubectl kubectl Kubernetes scale a deployment Google Kubernetes Engine Create Kubernetes cluser using gcloud Google Kubernetes Engine Create Kubernetes cluser using gcloud Free Online Labs https://labs.play-with-k8s.com Learn Kubernetes using Interactive Browser-Based Scenarios