#030 Kubernetes - Minikube

omarkhatib

Omar

Posted on July 5, 2020

#030 Kubernetes - Minikube

Introduction

this is part 30 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.


What is Minikube

Minikube

Minikube is like an virtual machine contain a Linux operation system and have 1 node as master also in same time as worker.
and you can communicate with it using kubctl using a configuration file.


Install on Linux

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube
Enter fullscreen mode Exit fullscreen mode
sudo mkdir -p /usr/local/bin/
sudo install minikube /usr/local/bin/
Enter fullscreen mode Exit fullscreen mode

this commands will install minikube on Linux , also we need to install kubctl

Download latest version

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
Enter fullscreen mode Exit fullscreen mode

then make it excutable

chmod +x ./kubectl
Enter fullscreen mode Exit fullscreen mode

move the excutable to bin so we can access it directly from terminal

sudo mv ./kubectl /usr/local/bin/kubectl
Enter fullscreen mode Exit fullscreen mode

to make sure that installation successful

kubectl version --client
Enter fullscreen mode Exit fullscreen mode

for other platforms check minikube and kubectl


Start the action

first we need to start minikube
minikube

minikube start --driver=virtualbox
Enter fullscreen mode Exit fullscreen mode

I am using driver virtualbox because I got some problem with driver docker , and lazy to fix them.

after successfully starting it. We can see that a cluster have been made , to see it type
configs

cat ~/.kube/config
Enter fullscreen mode Exit fullscreen mode

for windows users , it's in c>Users>your_username>.kube>config

We can see we have a cluster with name minikube , and user with name of minikube.

We can setup our own clusters in this file but we are going to do later on this journey.

kubectl

kubectl get nodes
Enter fullscreen mode Exit fullscreen mode

We can see that we have minikube ready and it's role is master also workder in same time.

💖 💪 🙅 🚩
omarkhatib
Omar

Posted on July 5, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related