Kubernetes


Kubernetes

Manage container lifecycle in automatic way(stop,start,scaling,deploy containers etc.)

A fleet of hosts is a cluster, nodes or workers

each node is an ec2 instance and u will use k8s to place containers on ec2 based cluster

Kubernets objects and api

Pods

Services

Volumes

Namespaces

Pod a container of a grouping of containers u run,Pod can have one container or many containers,a pod is a wrapping around containers that k8s communicates with for management,best and common practice is to use one Pod for one container

Each Pod has a ip address and u can define the ports it needs to connect to between pods or outside the container

Grouping of pods is a service

A pod or collection of pods that u want to expose as a microservice

K8s has built in service discovery using DNS

K8s volume is an object that represent directories that mount to pods so containers have access to modify files in a persistent manner,u can mount EBS volumes

Namespaces have multiple virtual k8 clusters backed by physical clusters

Create k8s objects to define desired state of your cluster

New pod scaling changing newtok or disk resources

K8s control plane accepts the api calls and k8 objects and carrying out changes

control plane has a master that keeps desired state

new pod creation interacts with master node

use kubectl to create a pod then master will schedule on nodes in cluster

cluster is the data plane

Multi master across AZs

Master contains kube api server front end for cplane

etcd KV store cluster data and needs to replicated

kube scheduler to schedule

controller manager runs controller whhen nodes need to be rebooted or replaced or replicated

Worker nodes in VPCS spread across 3 AZs

Nodes need to talk to master

kubelet node agent and docker on worker nodes

good idea to use autoscaling with nodes

Amazon EKS takes care of complexity

EKS creates and manages master nodes and state store of control plane while customer retains control of the worker nodes

aws eks tight intertgartion with other aws services like SNS,SQS,Route53,IAM,ELB,Secrets Manager,aws api gateway,aws dev tools for ci/cd,cloudwatch

pod spec is a yaml file

container,names,volumes are defined

replica set so that replicas are run at one time

replica set is passed to a deployment

scheduler places the pods

eks scheduler for pod placement runs filters

volume filter to see which nodes are compatible,resource filter cpu,disk space,availabe ports

scheduler also looks at constraints it runs on managed control plane

eks control kube control are tools

eks control create a cluster - eksctl create cluster

kubectl for working with containers

kubernetes cluster autoscaler

1.horizontal pod scaler

2.vertical pod scaler

kubernetics metric scaler on github

aws service discovery

aws app mesh

aws service discovery

management of directing network calls or traffic between services and exposing services to one another in an automatic and dynamic way

through DNS

through registry of container instances

ECS using DNS for registry of service names using route 53 api

aws cloud map

eks supports service discovery through dns

Service Mesh

uses AWS App mesh

DIY service discovering using third party tools like Hashicorp consul,etcd or netflix eureka

all 3 are distributed key value stores

App mesh is open source implementation of envoy

side car container- what is a side car container?


These writings represent my own personal views alone.
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.