Learning Modules on Kubernetes for Beginners

Good Day All! Hope you are enjoying your weekend.

In last couple of days, I was exploring Kubernetes in my Lab environment. I explored many new things as a beginner. I tried to gather all W-H questions which may ask or come into your mind if you are thinking to start Kubernetes.

kubernetes

Based on that, I prepared a learning module on Kubernetes Specially for Beginners. If you are new to Kubernetes, you might have lot of queries such as How and Where to Start it from scratch. I segregated all such queries in different topics and prepared a complete learning module specially for techies who just jumped or thinking to start this hot selling technology.

Here is complete module of Kubernetes for Beginners: –

 

Topic 1 – What is Kubernetes? | Learn Kubernetes – Part 1

Topic 2 – Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Topic 3 – Versions of Kubernetes | Learn Kubernetes – Part 3

Topic 4 – Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Topics 5 – Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

Topics 6 – How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

In next few days, I am going to add more topics here whatever I get to know as a beginners. I will get back to you through this blog. Please stay tuned.

If you wants to add some topics here or if I did some mistake, please do not hesitate to share in commend box or email us at admin@cloudpathshala.com

sito-e-commerce2

If you think that it is useful, please do share with others.

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

We are all set with the theoretical concepts of Kubernetes. Now we are going to take you through setting up Minikube on your Windows 10 Pro machine with Hyper-V. This will setup up a basic platform for Kubernetes called Minikube. This is one of the Installation Model we discussed in last article of “Getting Start with Kubernetes.” This method is basically known as Local Machine Solution(Minikube).

We will quickly walk you through with the basic prerequisites to set your belt for the installation and setup.

Windows 10 Pro Physical machine(Laptop) and ensure to keep Memory at least 8 GB for a good performance. Keeping 4 GB Memory won’t allow you to power on Minikube VM.

Prerequisites: –

  • VT-x/AMD-v virtualization must be enabled in BIOS.
  • Enable Hyper-v on your Windows 10 Machine.
  • Download the latest Minikube. Click Here.
  • Download the latest Kubectl command line utility. Click Here.
  • Windows Package Manager – Chocolatey
  • And most important thing that you must have Internet connectivity on Windows 10 machine.

Installation Steps: –

  1. Download all required components.
  2. Place Minikube and Kubectl in C drive.
  3. Install Hyper-v in Windows 10 machine
  4. Configure Hyper-v Networking
  5. Install Chocolatey in Windows 10 machine
  6. Setup Minikube VM using Minikube command line.
  7. Verify Kubernetes Dashboard

Step by Step Guide: –

Follow the Prerequisites: –

  • Download the latest Minikube. Click Here.
  • Download the latest Kubectl command line utility. Click Here.
  • The file name is minikube-windows-amd64.exe. Rename this exe as “minikube”.
  • Place minikube and kubectl in C drive root directory. You need to place these files in OS drive because there is a bug in the Minikube which does not allow to install the local cluster if it is place anywhere other than C drive or in OS drive.
  • Go to Run and type %HOMEPATH%.minikube. Verify the folder. You will see folders inside .minikube.

Install Hyper-v in Windows 10 Machine: –

  • Start your windows 10 machine in BIOS and verify that Intel VT-x/AMD-v virtualization is enabled. You can click here to see how to enable this feature.
  • Login to Windows 10 Machine. Go to Run and type appwiz.cpl
  • Click on Turn on Windows Features.
  • Here you will have to select Hyper-v Management Tools and Hyper-V Platform.
  • Click on OK. It will restart the machine.

2018-08-10 02_27_09-Windows Features

  • It is installing the feature.

2018-08-10 02_27_32-Windows Features

  • Hyper-v feature has been successfully installed. Click on Restart Now.

2018-08-10 02_28_22-Windows Features

Install and Setup minikube for Kubernetes environment: –

  • Download the latest Minikube. Click Here.
  • Download the latest Kubectl command line utility. Click Here.
  • The file name is minikube-windows-amd64.exe. Rename this exe as “minikube.exe”.
  • Place minikube and kubectl in C drive root directory. You need to place these files in OS drive because there is a bug in the Minikube which does not allow to install the local cluster if it is place anywhere other than C drive or in OS drive.
  • Open PowerShell using Administrative Privilege.
  • In below screenshots, my root directory is D drive as I am using dual boot in my laptop. If your system drive is C: then use below commands.
cd
c:
  • Below command will display the version of minikube.exe
.minikube.exe
  • Below command will show version of kubernetes. Make sure that you have internet in your machine. Minikube supports multiple versions of Kubernetes, we recommend you to use latest version
.minikube.exe get-k8s-versions

2018-08-10 02_37_20-Administrator_ Windows PowerShell

  • Go to Run and Type %HOMEPATH%.minikube. Press enter.

2018-08-10 02_38_00-Run

  • You will see folder called .minikube and there will be many sub folders inside this folder. This is to validate environmental variables.

2018-08-10 02_38_04-.minikube

Install Windows Package Manager – Chocolatey : –

For further deployments, you need to use Kubernetes Command Line Interface(CLI). To ta install that, you need to have Chocolatey Package manager as you are using windows platform.

  • You can browse URL https://chocolatey.org to see more information on this. Click on Install Chocolatey Now. You will get several options to install this.

2018-08-10 02_40_42-Chocolatey - The package manager for Windows ‎- Microsoft Edge

  • Here we are going to use below command to install Chocolatey Package Manager. Make sure that you have internet in your machine.
@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin"

2018-08-10 02_42_56-Administrator_ Command Prompt

  • Chocolatey has been successfully installed. Here you can refer to the message.

2018-08-10 02_43_58-Administrator_ Command Prompt

Install Minikube and Kubectl using Chocolatey Package Manager: –

  • Now use the chocolatey package manager to install minikube and kubectl(Kubernetes CLI). It will download and install both components it on your computer. Make sure you have internet.
choco install minikube
choco install kubernetes-cli

2018-08-10 02_44_54-Administrator_ Command Prompt - choco install minikube

  • Type Y to run the script.

2018-08-10 02_46_13-Administrator_ Command Prompt - choco install minikube

  • Chocolatey has installed both packages “minikube” and “kubectl(Kubernetes-CLI)”.

2018-08-10 02_46_26-Administrator_ Command Prompt

Make Networking Configuration in Hyper-V: –

Once you are done with above steps, now next step is to make your Hyper-V networking to use your local machine NICs. So make changes in this following below steps.

  • Go to Search and Type Hyper-V Manager.

2018-08-10 02_49_40-Start

  • On Hyper-V Manager console, Click on Virtual Switch Manager in right panel.
  • Click on Create Virtual Switch using External type.

2018-08-10 02_50_26-Virtual Switch Manager for DESKTOP-L3S8EDR

  • Give name of Virtual Switch and Select your Physical NIC of laptop in External Network so that it can communicate with external Nework.
  • Make sure to mark Check box on “Allow management operating system to share this network adapter” option.
  • Click on OK.

2018-08-10 02_52_14-Virtual Switch Manager for DESKTOP-L3S8EDR

  • Start Minikube VM which is on Hyper-V using below command.
minikube start --vm-driver hyperv --hyperv-virtual-switch "Pathshala Primary Virtual Switch"
  • One thing that I wanted to highlight here about an issue which I faced in my lab, that keep your laptop atleast with 8 GB memory. Because minikube VM get creates by default with 2 GB memory and rest will be used by your physical machine. However it is good to assign 4 GB memory to minikube VM. You can use below command to assign 4 GB memory.
minikube start --vm-driver=hyperv --kubernetes-version="v1.10.0" --hyperv-virtual-switch="Pathshala Primary Virtual Switch" --memory 4096

2018-08-10-02_55_16-Administrator_-Command-Prompt.png

  • Downloading Minikube ISO is in progress. Once complete, it will create a Virtual machine in your Hyper-V console. Keep monitoring your console.

2018-08-10 02_55_20-Administrator_ Command Prompt - minikube start --vm-driver hyperv --hyperv-virt

  • Keep monitoring the status of the task from this console.

2018-08-10 03_02_29-Administrator_ Windows PowerShell2018-08-10 03_02_03-Administrator_ Windows PowerShell

  • Press Y .

2018-08-10 03_02_29-Administrator_ Windows PowerShell

  • Here you can see that virtual machine with name of minikube has been created. As of now it is power off state. Once the above status will get complete, it will automatically power on this VM and will do the rest configuration.

 

2018-08-10 03_14_07-Hyper-V Manager

    • Once Minikube get successfully install, you need to Enable Dynamic Memory option.

 

  • To perform this, stop the Minikube by using below command.

 

 

 

minikube stop
  • Go to Hyper-V Manager, and Right Click on minikube VM. Click Edit Settings and Go to Memory Options.
  • Click on Enable Dynamic Memory and Click on OK.

2018-08-10 03_14_20-Settings for minikube on DESKTOP-L3S8EDR

  • Use below command to start Minikube.
minikube start
  • Check Minikube Status by using below command
minikube status
  • Output will be similar to below.
    • minikube: Running
    • cluster: Running
    • kubectl: Correctly Configured: pointing to minikube-vm at 192.168.66.53
  • So all done from installation and setup part. Now access your Kubernetes Dashboard by using below command.
minikube dashboard

kubernetes dashboard

That’s all from this Module of “Kubernetes Learning”. You can find all related articles here.

What is Kubernetes? | Learn Kubernetes – Part 1

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Versions of Kubernetes | Learn Kubernetes – Part 3

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

Thank you so much visiting here. If you found anything which needs correction, please do share in comment box.

If you found this article useful, please do share with others.

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

If you are new to Kubernetes, a question will come into your mind that How to Setup and use Kubernetes in your environment.

We are going to explain step by step procedure to setup the Kubernetes using different platforms. This article is meant to get you familiar with the manual process for setting up Kubernetes.

Before proceeding further, you need to know that what all steps it includes to setup  Kubernetes.

Here is 5 steps that you need to perform for complete the setup:

installation of kubernetes

  1. You need to setup a Virtual DataCenter (vDC).

  2. Once vDC is setup, Install Kubernetes Components.

  3. Move to Configuring Kubernetes Hosts

  4. Configure Kubernetes Master

  5. Configure Kubernetes Node

Kubernetes Installation Models:

Kubernetes can be setup on various platforms starting from your laptop, to VMs on a cloud provider, to a rack of bare metal servers.

  1. Local-machine Solutions (minikube)

    Kubernetes installation model

  2. Hosted Solutions (Google Container Engine)

  3. On-Premises turnkey cloud solutions (AWS Provider)

  4. Custom Solutions (Manual Install)

 

1. Local-machine Solutions

It’s easy enough to install Kubernetes in your home lab or laptop if you just want to “kick the tires” on Kubernetes, use the local Docker-based solutions.

  • Kubernetes using Minikube
  • Kubernetes using Containers
  • Installer-based Kubernetes
  • Kubernetes with kubeadm
  • Kubernetes with kops
  • Kubernetes with kargo
  • Ubuntu on LXD
  • Kubeadm-dind
  • IBM Cloud Private-CE

2. Hosted Solutions

When you are ready to scale up to more machines and higher availability, a hosted solution is the easiest to create and maintain.

  • Google Kubernetes Engine
  • Amazon Elastic Container Service for Kubernetes
  • Azure Container Service
  • Stackpoint.io
  • AppsCode.com
  • Madcore.Ai
  • Platform9
  • OpenShift Dedicated
  • OpenShift Online
  • IBM Cloud Container Service
  • Pivotal Container Service
  • Oracle Container Engine for Kubernetes
  • Kublr
  • APPUiO

3. On-Premises turnkey cloud solutions

Turnkey cloud solutions require only a few commands to create and cover a wide range of cloud providers. On-Premises turnkey cloud solutions have the simplicity of the turnkey cloud solution combined with the security of your own private network.

  • IBM Cloud Private
  • Kubermatic
  • SUSE CaaS Platform
  • SUSE Cloud Application Platform
  • Rancher 2.0
  • Kontena Pharos
  • Kublr
  • APPUiO

If you already have a way to configure hosting resources, use kubeadm to easily bring up a cluster with a single command per machine.

4. Custom Solutions

Custom solutions vary from step-by-step instructions to general advice for setting up a Kubernetes cluster from scratch. These solutions are combinations of cloud providers and operating systems not covered by the above solutions.

Cloud

  • CoreOS on AWS or GCE
  • Kubernetes on Ubuntu
  • Kubespray
  • Rancher Kubernetes Engine (RKE)
  • Gardener
  • Kublr

On-Premises VMs

  • Vagrant (uses CoreOS and flannel)
  • CloudStack (uses Ansible, CoreOS and flannel)
  • VMware vSphere
  • VMware vSphere, OpenStack, or Bare Metal (uses Juju, Ubuntu and flannel)
  • VMware (uses CoreOS and flannel)
  • oVirt
  • Fedora (Multi Node) (uses Fedora and flannel)

Bare Metal

  • Fedora (Single Node)
  • Fedora (Multi Node)
  • Kubernetes on Ubuntu
  • CoreOS

 

That’s all from this topic. In next articles we will see how to use and configure Kubernetes using these installation models.

If you want to add something in this article, please do share in comment box. If you find any mistake, please do correct it.

If you found it useful, please do share with others.

Related Articles: –

What is Kubernetes? | Learn Kubernetes – Part 1

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Versions of Kubernetes | Learn Kubernetes – Part 3

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

 

 

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

There are many terminology you need to know if you are new to Kubernetes and going to setup a Kubernetes environment. To make it more simpler, I have listed down most of them here in this article.

Nodes:

  • Nodes are the hosts that run Kubernetes applications.

container-applications-pods-kubernetes1

  • A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster.
  • Each node is manage by the Master.
  • A node can have multiple pods.
  • Kubernetes master automatically handles scheduling the pods across the nodes.

Containers:

  • Containers are the units of packaging for development, shipment and deployment.Tintri-containers-support-blog
  • Containers are a solution to the problem of how to get software to run reliably when moved from one computing environment to another.
  • Docker is a popular, open-source container format that is supported on Google Cloud Platform and by Google Kubernetes Engine.

Pods:

  • Pods are unit of deployment.

Kuberenetes Pods

  • It is basic building blocks in Kubernetes.
  • It is a group of containers that are deployed together on the same host.
  • It represents a single instance of a running process in your cluster.

Replication Controller:

  • It ensures availability and scalability.

Replication Controller

  • It ensures a given number of pods are running in the cluster at a given time.
  • You use it on regular basis to launch one or more instances of your applications.
  • Each replication controller has a desired state that is managed by the application deployer.
  • It is a structure that enables you to easily create multiple pods, then make sure that that number of pods always exists. If a pod does crash, the Replication Controller replaces it.
  • It is also known as ReplicaSet

Labels:

  • Labels are the Key-Value pairs for identification.

kubernetes label

  • When creating Kubernetes objects, one can give any number of labels to each object which are discoverable across the system.
  • It is kind of tagging the instances.
  • It use to organize Kubernetes objects.
  • It certain restrictions concerning length and allowed values

Services:

  • Services are collection of pods exposed as an endpoint.
  • It is a grouping of pods that are running on the cluster.

Kubernetes Services

  • It enables communication between various component of within and outside of applications.
  • It help us to connect applications with other applications.
  • You can have many services within the cluster.
  • It provides features such as load-balancing, service discovery between applications, and features to support zero-downtime application deployments.
  • Each service has a pod label query which defines the pods which will process data for the service.
  • Kubernetes services are an abstraction for pods, providing a stable, virtual IP (VIP) address.

Namespace:

  • Namespace is use for managing Kubernetes cluster.
  • It is helpful when multiple teams are using the same cluster and there is potential of name collision.
  • It helps communication between pods.
  • Namespace are the virtual cluster which is on top of physical cluster.
  • If you are a windows guy, it is similar to the concept of DFS namespace in Windows environment.

These all are the most comonly used terminology which you need to know before proceeding for the setup. If you have more concepts to add in this topic, please do share in comment box.

In next article, we are going to explore how to setup the Kubernetes environment.

Please do share if you found this article useful.

 

Related Articles: –

What is Kubernetes? | Learn Kubernetes – Part 1

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Versions of Kubernetes | Learn Kubernetes – Part 3

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

 

 

 

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Kubernetes consists of several components, some of them optional, some mandatory for the whole system to function.

There are mainly two nodes. Each nodes have several components.

  1. Master Node

    • Master node is responsible for the management of Kubernetes cluster.
    • This is for all administrative tasks.
    • It is also responsible for taking care of Orchestrating the worker node.
  2. Worker Node

    • Worker node is responsible to run Pods.
    • It contains all the services to:
      • Manage the networking between the container
      • Communicate with master node
      • Assign resources to containers scheduled.

List of Components of Kubernetes: –

Components of Kubernetes

Architecture of Kubernetes Components: –

Kubernetes follows client-server architecture. Wherein, Master Node is installed on one machine and the Worker node is installed on separate Linux machines.

Kubernetes Architecture

That’s is all from this topic. In next articles we will explore more about Kubernetes. Please refer to different Parts of “Learn Kubernetes”.

Related Articles:-

What is Kubernetes? | Learn Kubernetes – Part 1

We will appreciate if you add your inputs in comment box. We will definitely add it to the relevant section.

Thanks for visiting here. Share this article if you found it useful.

Related Articles: –

What is Kubernetes? | Learn Kubernetes – Part 1

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Versions of Kubernetes | Learn Kubernetes – Part 3

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6

What is Kubernetes? | Learn Kubernetes – Part 1

One Liner Definition: –

Kubernetes is a platform to work with Container. It provides Deployment, Scaling, and Monitoring.

Kubernetes_(container_engine)

Origin and meaning of Kubernetes: –

Kubernetes, an Open source project from Google, generally known as K8s. The name Kubernetes originates from Greek, meaning helmsman or pilot, and is the root of governor and cybernetic. K8s is an abbreviation derived by replacing the 8 letters “ubernete” with “8”.

Overview of Kubernetes: –

  • Kubernetes is an orchestration engine for container technologies such as Docker and Rocket container. It orchestrates computing, networking, and storage infrastructure on behalf of user workloads.
  • It makes containerized applications astonishingly easy to deploy, scale, and manage.
  • It is a portable, extensible open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
  • It can speed up the development process by making easy, automated deployments, updates, and by managing our apps and services with almost zero downtime.
  • It also provides self-healing. Kubernetes can detect and restart services when a process crashes inside the container.
  • It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
  • It provides much of the simplicity of Platform as a Service (PaaS) with the flexibility of Infrastructure as a Service (IaaS), and enables portability across infrastructure providers.
  • Kubernetes isn’t a replacement for Docker. However, Kubernetes is a replacement for some of the higher-level technologies that have emerged around Docker.
  • It keeps analyzing your traffic and the load that’s being used by the container. When the traffic is reaching the threshold, it auto scale up containers.
  • It works with Master node and worker nodes. Each worker nodes work with multiple pods.
  • It is originally developed by Google, it is open-sourced since its launch and managed by a large community of contributors. Any developer can package up applications and deploy them on Kubernetes with basic Docker knowledge.

Scenario for using Kubernetes: –

Let’s take an example that you have lot of workloads that is being managed by Containers. When work loads increases then you have to scale up container manually. Here Kubernetes helps by doing the auto scale of containers when workload reaches to the threshold.

That’s is all from this topic. In next articles we will explore more about Kubernetes. Please refer to different Parts of “Learn Kubernetes”.

We will appreciate if you see any inputs to add here, do share in comment box. We will definitely add it to our sections.

Thanks for visiting here. Share this article if you found it useful.

 

Related Articles: –

What is Kubernetes? | Learn Kubernetes – Part 1

Components and Architecture of Kubernetes | Learn Kubernetes – Part 2

Versions of Kubernetes | Learn Kubernetes – Part 3

Kubernetes Terminology every admins need to know | Learn Kubernetes – Part 4

Getting Start to Setup and Configure Kubernetes | Learn Kubernetes – Part 5

How to Install Kubernetes on Windows 10 with Hyper-v using Minikube| Learn Kubernetes – Part 6