MiniKube for Absolute Beginners

GeekerHWH | Feb 21, 2024 min read

This page is the note for learning Kubernetes, I took this from the Udemy course @Mumshad Mannambeth

Theory

Concepts

  • Node: a physical or virtual machine where kubelet was installed, and it’s where containers will be launched.
  • Cluster: a set of nodes grouped together
  • Master: responsible for orchestration and monitor the status of nodes
  • Objects
    • metadata Data that helps uniquely identify the object, including a name string, UID, and optional lables and namespace
    • spec short term for “specification”, describes what state you desire for the object

Components

  • API Server: front end to interact with k8s cluster in master
  • etcd key store: a distributed reliable key-value store, storing the data used to manage the cluster
  • Shedular: responsible for distributing containers across multiple nodes
  • Controller: responsible for noticing and responding when nodes, containers, endpoints goes down
  • Kublet: the agent that runs on each node in the cluster
  • Container Runtime: docker engine architecture

MiniKube Hands-on

MiniKube quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. it mainly focus on helping application developers and new Kubernetes users.

The cluster is in a VM or a Container, master node and worker node are combined in just one node called “minikube”

Everything we are going to create is within this special node, including Pods, Development, Service, etc…

Start minikube cluster

minikube start --driver=docker\
               --static-ip={the_ip_you_want}

# usable for me (as a Chinese user)
minikube start --driver=docker\
               --static-ip=192.168.100.100\
               --image-mirror-country=cn
# or
minikube start --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'

Start minikube dashboard

minikube dashboard

then your browser will automatically create a new tab with kubernetes dashboard

dashboard

Deployment

Deployment Strategies

Recreate vs. RollingUpdate

comments powered by Disqus