Posts

Lets create a cluster - foreword

We would be running a full kubernetes (multi-node support) on a single node only (this is more complex but lets us learn more). Starting with something "simple" going onto full application. On local computer and using docker. My computer has ubuntu installed. Several reasons why you should NOT be using windows: It is large and consumes a lot of resources It does not scale It does many things without you knowing You cannot check its sources It sends a lot of data to advertisement servers It installs and deletes applications without asking you for permission (ex. soda saga crap) It installs updates without asking and force you to install them When updating it would restart When <whatever> it would restart You could block the updates... almost and with a lot of effort It is not secure I have a laptop with 32GB eMMC disk (difficult to replace) and 2GB of RAM - it cannot even update on clean system without any apps installed... at the same time linux can easily run on a ver...

Cluster, node, minikube

Out containers are running on some machine (likely a physical server). Such a server is called a node. Our application might require a large ecosystem of microservices - possibly thousands of such physical machines. They all create a cluster of nodes. To learn you often start with a minikube - a single node k8s. This way many things are done for you - but you would skip some important steps and, at some point, you would need to go through full k8s installation. Summary: Cluster of nodes running pods (containers) on them. Minikube is 1-node only cluster with many things already done.

Deployment

To create a pod you would need: an image of operating system (to run inside a container) image should likely include our application instruction describing container creation This (and more) is called a deployment .

Pod, container

Your application probably consists of microservices. Each would be running in its own virtual machine (or physical machine... it doesn't really matter). Suc a virtual machine is our "container" . A container could be rarely a physical machine. Usually it would be a virtual machine on aws, azure, google cloud or our own server. Container is created using some virtualization technology. Some examples are virtualbox, hyperv, vmware, kvm2, docker. My choice is to use docker . For k8s container is a pod . Like a pod of whales (group of whales). But creation of the container might fail - thus one pod could have more than one container under it. Summary: A pod is one (or more) machine (likely virtual) called "container".

Introduction

If you are here, then most likely you would like to start with kubernetes but you do not know where to begin. Like me once. K8s documentation can be found at https://kubernetes.io . K8s is an orchestration tool for your cloud. It means it would create, maintain, kill, restart and do some more things with your cloud computers. Basic commands of kubernetes are kubectl and kubeadm. Most things are configured using .yaml or .json files. Difficult things: - graphical management is possible but unstable, with issues, not everything can be done there - text-only command line is something you must get used to - security is quite complex - multiple machines communication won't always work - causing a lot of issues

The goal

My goal is to present Kubernetes (also known as k8s for short) in a short, easy and least painful way possible.