Skip to content

This is my soft intro guide to the world of kubernetes

Notifications You must be signed in to change notification settings

muth0mi/k8s-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A soft introduction to kubernetes deployment

This guide presumes you are comfortable with docker containerization and explains how to get your images spinning on a k8s environment.

Prerequisites

  1. Kubectl
  2. Minikube
  3. Virtualbox - This will supply the hypervisor to minikube to create vm on. Alternatives

Installation

Kubectl is a Kubernetes command-line tool that allows running commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.

Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on a PC for users looking to try out Kubernetes or develop with it day-to-day. For more demanding usage, consinder running kubernetes on bare metal.

Steps

  1. # pacman -S kubectl
  2. # pacman -S minikube
  3. # pacman -S virtualbox

Launch minikube

  • To launch a minikube cluster execute $ minicube start
  • To launch with custom hypervisor $ minikube start --driver=docker
  • To set default hypervisor $ minikube config set driver docker. Virtualbox is the default in a fresh setup
  • To delete cluster $ minikube delete
  • To open the k8s dashboard, run $ minikube dashboard

Basics

Pods are the building blocks of a k8s system. Sort of like images to docker, well, or atoms to an element. A pod hosts and manages one or multiple containers.

Replication controllers manage behaviour of pods in terms of creating, deleting, healing, etc

A deployment is a special ( on steroids ) replication controller that allows updates and rollbacks of deployed pods more systematically.

A service exposes a pod, Replication controllers or deploymenent to the external world or to a different node within the cluster. Services have a static IP and communicate to pods using Labels.

Deploy an application

  1. Apply the deployment to your cluster kubectl apply -f /path/to/deployment.yml
  2. Create a service for the deployment kubectl create -f /path/to/service.yml
  3. Run the application by visiting https://<cluster-ip>:<nodePort>

This guide works only for monolithic application and is not production certified. This is for the most part educational and doesn't consinder the nitty gritties of deployment.

About

This is my soft intro guide to the world of kubernetes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published