How to start with Kubernetes for beginner

How to start with Kubernetes for beginner

Prior knowledge require: Python or any other language development knowledge. Knows about what is GIT and how it works. Good if you know about Docker.

What can Kubernetes do for you?

With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated in an easy and fast way without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google’s accumulated experience in container orchestration, combined with best-of-breed ideas from the community.

So in short, when you need to run your application all round the clock. You need to deploy and update release your application any time or several times. Then Kubernetes comes to rescue it. And now most of the cloud hosting supports it and very easy to deploy as well.

Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure.

  • The Kubernetes Master is a collection of three processes that run on a single node in your cluster, which is designated as the master node. Those processes are: kube-apiserverkube-controller-manager and kube-scheduler.
  • Each individual non-master node in your cluster runs two processes:
  • kubelet, which communicates with the Kubernetes Master.
  • kube-proxy, a network proxy which reflects Kubernetes networking services on each node.

The basic Kubernetes objects include:

Kubernetes Master

The Kubernetes master is responsible for maintaining the desired state for your cluster. When you interact with Kubernetes, such as by using the kubectl command-line interface, you're communicating with your cluster's Kubernetes master.


Kubernetes Nodes

The nodes in a cluster are the machines (VMs, physical servers, etc) that run your applications and cloud workflows. The Kubernetes master controls each node; you’ll rarely interact with nodes directly.

What is container

Containers are a technology for packaging the (compiled) code for an application along with the dependencies it needs at run time. Each container that you run is repeatable; the standardization from having dependencies included means that you get the same behavior wherever you run it.

What is container image

A container image is a ready-to-run software package, containing everything needed to run an application: the code and any runtime it requires, application and system libraries, and default values for any essential settings.

What is container runtime

The container runtime is the software that is responsible for running containers.

Kubernetes supports several container runtimes: Docker, containerd, CRI-O, and any implementation of the Kubernetes CRI (Container Runtime Interface).

Master

Manage, build, deploy and operate

Node

Run containers and registries


Let see how to install and run in local system

I am using Ubuntu you can use any linux .


Steps

Installing kubectl

Download a pre-compiled release[1] and unzip it — — kubectl should be located in the

platforms/<os>/<arch> directory.

[1] https://github.com/kubernetes/kubernetes/releases

Add kubectl to your path. Note, you can simply copy it into a directory that is already in your $PATH (e.g. /usr/local/bin). For example:

$ sudo cp kubernetes/platforms/linux/amd64/kubectl /usr/local/bin/kubectl

You also need to ensure it’s executable:

$ sudo chmod +x /usr/local/bin/kubectl

administration

To administer and interact with any given Kubernetes cluster (local or remote), you must set

up your kubeconfig file. By default, kubectl configuration lives at

~/.kube/config

You can also create a cluster in your local machine via Minikube (See section 3: Running Locally via Minikube)


Prerequisit for minikube

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS on all platforms.

For example:

$ cat /proc/cpuinfo | grep ‘vmx\|svm’

Make sure if the setting is enabled where this command should output something.

Install an x86 virtualization software package in your local machine:

Linux: The latest VirtualBox

Install minikube

Feel free to leave off the sudo mv minikube /usr/local/bin if you would like to add minikube to

your path manually.

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.12.2/minikube-

linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Install kubectl

You will need to download and install the kubectl client binary to run commands against the

cluster. For example:

$ curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.3.0/bin/

linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

Getting started

Note that the IP below is dynamic and can change. It can be retrieved with minikube ip.



# To access the Kubernetes Dashboard, run this command in a shell after starting minikube to get the address:

$ minikube dashboard

$ minikube stop

Stopping local Kubernetes cluster…

Stopping “minikube”…

kubectl CLI

kubectl [command] [TYPE] [NAME] [flags]

Viewing, Finding Resources

# Get commands with basic output

$ kubectl get pod



To know more about the usage kindly visit https://kubernetes.io/

To know how to use Kubernetes in Google Cloud

Kubernetes - Google Kubernetes Engine (GKE) | Google Cloud

Send feedback Google Kubernetes Engine Secured and managed Kubernetes service with four-way auto scaling and…

cloud.google.com


To know how to use Kubernetes in AWS

Amazon EKS - Managed Kubernetes Service

The most trusted way to run Kubernetes Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes…

aws.amazon.com


要查看或添加评论,请登录

Dhiraj Patra的更多文章

  • Robotics Study Guide

    Robotics Study Guide

    image credit wikimedia Here is a comprehensive study guide for robotics covering the topics you mentioned: Linux for…

  • Some Handy Git Use Cases

    Some Handy Git Use Cases

    Let's dive deeper into Git commands, especially those that are more advanced and relate to your workflow. Understanding…

  • Kafka with KRaft (Kafka Raft)

    Kafka with KRaft (Kafka Raft)

    Kafka and KRaft (Kafka Raft) Explained with Examples 1. What is Kafka? Kafka is a distributed event streaming platform…

  • Conversational AI Agent for SME Executive

    Conversational AI Agent for SME Executive

    Use Case: Consider Management Consulting companies like McKinsey, PwC or BCG. They consult with large scale enterprises…

  • AI Agents for EDGE AI

    AI Agents for EDGE AI

    ?? GenAI LLM-Based Agents on Edge AI: Why, When, and How? ?? Why Use GenAI LLMs on Edge AI? Deploying Generative AI…

  • Introducing the Intelligent Smart Forklift

    Introducing the Intelligent Smart Forklift

    Introducing the Intelligent Sensor Fork Revolutionizing Forklift Safety and Efficiency Say goodbye to relying on…

  • Investing in Bonds to Diversified Your Portfolio

    Investing in Bonds to Diversified Your Portfolio

    Investing in Tax-Free Bonds: A Smart Choice for Conservative Investors Are you looking for a low-risk investment option…

  • Design and Develop Autonomous Mobile Robots (AMR)

    Design and Develop Autonomous Mobile Robots (AMR)

    We are exploring the development of smart Autonomous Mobile Robots (AMR). AMRs are designed to navigate and perform…

  • Rent vs Buy a Home in Depth Financial Analysis

    Rent vs Buy a Home in Depth Financial Analysis

    Say you are staying in rent and want to get a clear idea to decide whether to buy a similar home/apartment or stay in…

  • Python Open Source Tools

    Python Open Source Tools

    The world of Python development is vast, with a wide array of tools available to streamline every stage of the process.…

社区洞察

其他会员也浏览了