🥒
Dill's Knowledge Base
  • Hello World
  • 💻SQL
    • ❌Error Handling
    • 🧀Parameter Sniffing
      • Indexes
      • Query Hints
      • RECOMPILE
      • Branching
      • Memory Grants
      • Summary
      • Bonus
    • SQL Server Buffer Pool
  • 🖱️MongoDB
    • Instructor Led Training
      • DF100
      • DF200
      • DF300
      • DF400
    • MongoDB DBA University
      • DBA Admin Tools
      • DBA Basics
      • Metrics & Monitoring
  • 💻Web Design
    • Oxygen Tips
    • Bricks Builder
      • Tips
      • Discovery Call
      • Utility vs Custom Classes
      • Math Functions
      • Static vs Relative Units
  • Azure
    • AZ-900
      • Benefit of Cloud Computing
      • CapEx, OpEx and Consumption-based
      • Differences Between Cloud Service Categories
      • Identify The Right Service Type
      • Differences Between Types of Cloud Computing
      • Reliability and Predictability
      • Regions and Region Pairs
      • Availability Zones
      • Resource Groups
      • Subscriptions
      • Management Groups
      • Azure Resource Manager
      • Azure ARC
      • Resources Required for VM
      • Benefits and Usage of Core Compute Resources
      • Benefits and Usage of Core Network Resources
      • Public/Private Endpoints
      • Benefits and Usage of Storage Accounts
      • Benefits and Usage of Database Resources
      • Data Movement and Migration Options
      • Benefits and Usage of IoT Services
      • Benefits and Usage of Big Data and Analytics Services
      • Benefits and Usage of AI Services
      • Benefits and Usage of Serverless Technologies
      • Benefits and Usage of DevOps Technologies
      • Functionality of Azure Management Solutions
      • Functionality and Usage of Azure Advisor
      • Functionality and Usage of ARM Templates
      • Functionality and Usage of Azure Monitor
      • Functionality and Usage of Azure Service Health
      • Functionality of Microsoft Defender for Cloud
      • Functionality and Usage of Key Vault
      • Functionality and Usage of Microsoft Sentinel
      • Azure Dedicated Host
      • Defense in Depth
      • Describe the Concept of Zero Trust
      • Functionality and Usage of NSGs
      • Functionality and Usage of Azure Firewall
      • Functionality and Usage of Azure DDoS Protection
      • Explain Authentication and Authorization
      • Functionality and Usage of Azure AD
      • Microsoft Entra Overview
      • Functionality of Conditional Access, MFA and SSO
      • Functionality and Usage of RBAC
      • Functionality and Usage of Resource Locks
      • Functionality and Usage of Tags
      • Functionality and Usage of Azure Policy
      • Governance Hierarchy Constructs
      • Azure Blueprints
      • Describe Microsoft Privacy Statement, OST and DPA
      • Purpose of Trust Center and Azure Compliance Documentation
      • Purpose of Azure Sovereign Regions
      • Factors That Affect Costs
      • Factors to Reduce Cost
      • Functionality and Usage of Azure Cost Management
      • Purpose of Service Level Agreements
    • DP-900
      • Study Cram
    • DP-300
      • Deploy IaaS Soluton with Azure SQL
  • 📦Kubernetes
    • Udemy: Kubernetes for Beginners
Powered by GitBook
On this page
  • Containers vs VMs
  • Docker Basics
  • Container Orchestration
  • K8s Architecture
  • Master vs Worker Nodes
  • Kubernetes Pods
  • Installing MiniKube locally
  • YAML
  • Dictionary vs List vs List of Dictionaries
  1. Kubernetes

Udemy: Kubernetes for Beginners

Open source project built by Google

Containers are necessary because they isolate compatibility between various components and the underlying infrastructure

Containers make setting up dev/test environments very easy

  • All somebody would have to do is make sure docker is installed on the system

  • They can have their own processes, network, mounts, etc, but they all share the same OS Kernel

All OS's consist of two things:

  • OS Kernel: Total control over interacting with hardware

  • Software: It makes the OS different (MacOS, Ubunut Linux, etc)

Docker utilizes underlying kernel

  • You can't run a windows container on a server that runs linux, instead you would need a windows VM

Containers vs VMs

  • VMs have the OS on the actual hardware itself whereas docker runs separate of the OS

  • VMs require much more disk space and use more CPU

  • Docker containers can boot up in a matter of seconds

  • In a VM, you can have both linux and windows on the same hypervisor

Docker Basics

  • Docker Registry: You can find images of most common DBs, OSs, etc with simple commands

    • Ex. docker run mongodb

  • Containers are running instances of images that are insulated

  • Developers can now create a docker file, which creates an image, and that image can be ran on a container platform

    • This makes it easy for operations teams to set up and run an application

Container Orchestration

How do you run a container in production that requires other resources and or has variable load?

  • You need an underlying platform to orchestrate the activity between containers and automatically scale up/down

  • Ex. Kubernetes, Docker Swarm, MESOS, etc

Tools like K8s make appications highly available & load balanced with a set of simple config files

K8s Architecture

Nodes:

  • machine (physical or virtual) in which K8s is installed

  • worker machine where containers will be launched by k8s

  • AKA "minions" in the past

Cluster:

  • set of nodes grouped together

  • helps load balance

Master:

  • Responsible for moving workload from a failed node to another node

  • The master is a node itself that watches and orchestrates containers on other nodes

When installing K8s on a server, you are actually installing these services:

  • API Server

    • frontend for K8s

  • etcd

    • distributed key value store to store data used to manage the cluster

    • manages locks between masters

  • kubelet

    • agent is responsible for the containers on the node it is running are working as expected

  • container runtime

    • underlying software to run containers

      • i.e. docker

  • controller

    • brain behind orchestration

    • noticing and responding when things fail

    • may bring up new containers in such cases

  • scheduler

    • responsible for distributing work or containers across multiple nodes

Master vs Worker Nodes

The worker node is where the containers are hosted and that usually has docker installed or something equivalent

The master server has the kube-apiserver while the worker nodes have kubelet agent

The master holds the etcd keystore, controller, and scheduler

kubectl is a CLI tool that is used to deploy and manage apps on a K8s cluster

Kubernetes Pods

K8s does not deploy containers directly on the worker nodes

A pod is a single instance of an application and is the smallest object you can create in K*s

Simple example:

  • single node K8s cluster with a single instance in a single container encapsulated in a pod

  • If you need to scale, you need to add additional instances of your app

    • to do this, you create a brand new pod on the same node

    • You can always deploy additional pods on a new node in the cluster to expand the overall resources

    • never add additional containers to an existing pod

Multi-container PODs

  • a single pod can have multiple containers, but typically the containers are not of the same kind

    • you may have a "helper" pod that lives along side your application container

    • They can refer to each other as localhost and can also share the same storage space

  • You deploy your container by running docker run command and you keep running that to create new containers

    • If you also have helper containers, it is best to define those in separate pods so that they scale together

    • Even if your app has a single container, K8s requires you to use PODs

Installing MiniKube locally

Requirements:

1) kubectl

2) virtualbox (or some other virtualization driver like hyper-v, which may already be installed)

3) minikube

YAML

  • spacing in YAML is very important

  • arrays are defined with a "-"

Dictionary vs List vs List of Dictionaries

  • Dictionary is unordered while a list/array is ordered

PreviousDeploy IaaS Soluton with Azure SQL

Last updated 1 year ago

📦
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
https://www.virtualbox.org/wiki/Downloads
https://minikube.sigs.k8s.io/docs/start/