|||

Kubernetes Core Concepts

architecture

Node - 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 managed by the Master/Control Plane. A Node can have one or multiple pods. The k8s scheduler selects a Node for a Pod. The Node’s kubelet makes sure its assigned containers run.

Container - A container is a stand-alone, executable piece of software which includes everything that is required to run it. This is achieved in Linux by carving a subset of the Linux Kernel using an API called cggroups. This provides a high amount of isolation from the operating system, but without the runtime performance hit of virtualised environments.

Pod - is a collection of containers, with shared storage and network, and a specification on how to run them. A pod should be seen as an ephemeral primitive.

Replica Set - runs n number of pods, based on the provided template.

Services - As pods are ephemeral it is difficult to reference an individual pod. Service fixes this issue by providing abstraction over Pods and provide an addressable method of communicating with pods. 4 main types

  • ClusterIP (default) - exposes the service on an IP thats only internal to the cluster.
  • NodePort - exposes the service on a static port exposed by the node.
  • LoadBalancer - external IP to act as a load balancer for the service
  • ExternalName - Maps a service to a dns name for calling out

Deployments - manage replicasets and can be used to run rolling upgrades between versions of your applications.

  • Rolling updates (default)
  • Blue Green (A/B) - parallel env, deploy to that env and then switch over the traffic after testing
  • Canary - direct very small amount of traffic to the new deployment
  • Rollback

ConfigMap - allow to mount configuration files into a Pod as an Environment variable or as a file system mount.

Ingress - allow external traffic to reach the cluster internal services like Kong or nginix.

Up next Refactor react code to use state store instead of multiple useState hooks
Latest posts Kubernetes Core Concepts Refactor react code to use state store instead of multiple useState hooks Notes on Python Threat Modelling - Using Microsoft STRIDE Model WCAG - Notes Flutter CI/CD with Azure Devops & Firebase - iOS - Part 1 Flutter CI/CD with Azure Devops & Firebase - Android - Part 2 How to samples with AWS CDK A hashicorp packer project to provision an AWS AMI with node, pm2 & mongodb Some notes on Zeebe (A scalable process orchestrator) Docker-Compose in AWS ECS with EFS volume mounts Domain Driven Design Core Principles Apple Push Notifications With Amazon SNS AWS VPC Notes Building and Deploying apps using VSTS and HockeyApp - Part 3 : Windows Phone Building and Deploying apps using VSTS and HockeyApp - Part 2 : Android Building and Deploying apps using VSTS and HockeyApp - Part 1 : iOS How I diagnosed High CPU usage using Windbg WCF service NETBIOS name resolution woes The troublesome Git-Svn Marriage GTD (Getting things done) — A simplified view Javascript Refresher Sharing common connection strings between projects A simple image carousel prototype using Asp.net webforms and SignalR Simple logging with NLog Application logger SVN Externals — Share common assembly code between solutions Simple async in .net 2.0 & Winforms Clean sources Plus Console 2 — A tabbed console window