This page is under regular updates. Please check back later for more content.
K8s Deployment Env

Understanding Deployment Options

Kubernetes can be deployed in many environments

  • In a public cloud
  • On-premise in a datacenter
  • Using Minikube or any other compact Kubernetes distribution for testing and developing

As Minikube is a rich and easy to use platform, students are recommended to install Minikube for this course In other platforms some components may be not available.

minikube consist of both controlled node and worker node within a single node.

Minikube

What is Minikube?

  • Minikube is an all-in-one Kubernetes solution
  • Typically, controller and worker functionality are offered in one virtual machine
  • To run minikube in a virtual machine, you need a virtualization layer to be present and configured
  • Configuration of the virtualization layer is not discussed in the course as it is operating system dependent and doesn't have to do with CKAD
  • As an easy alternative, Minikube can also be started in a container
  • It is recommended installation method will show you how to install Minikube as a container using a dedicated Ubuntu virtual machine

![DevOps_K8s_MiniKube_ENV]

Configuration requirement

  • Minikube offers a complete test environment that runs on Linux, OS-X or Windows
  • In this course, we'll focus on Minikube as it is easy to set up and has no further dependencies
  • Also, Minikube comes as a ready-to-use Kubernetes distribution with many add-ons installed
  • For best possible flexibility, it's a good idea to install Minikube in a virtual machine
  • Alternatively, you may run it on top of any operating system
  • To use Minikube, you should have at least 2 GiB (4 GiB recommended) RAM and 2 vCPUs

Setting up the environment

To set up the Minikube in your Ubuntu machine use the following command/script -

wget https://xanderbilla.s3.ap-south-1.amazonaws.com/ORG_DATA/k8s/Ubuntu_Lab_MiniKube_Setup.sh
chmod +x Ubuntu_Lab_MiniKube_Setup.sh
./Ubuntu_Lab_MiniKube_Setup.sh
minikube start --vm-driver=docker
minikube status

Verification

  • minikube status shows current status
  • kubectl get all: verifies kubectl client operation
  • minikube start starts Minikube
  • minikube stop stops Minikube
  • minikube ssh logs in to the Minikube host
  • docker ps shows all Docker processes on the Minikube host

The minikube command has different options -

  • dashboard: opens the K8s dashboard in the local browser
  • delete: deletes a cluster
  • ip: shows the currently used IP address
  • start: starts a cluster
  • stop: stops a cluster
  • status: gives current status
  • version: shows current version
  • ssh: connects to the Minikube cluster

You can use kubectl auto completion command for Working with K8s