9 - Kubernetes (Light Theme)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Module Checklist

Container Orchestration
with Kubernetes

By Techworld with Nana


Video Overview
★ Introduction to Kubernetes
★ Basic Concepts and Main K8s Components
★ Kubernetes Architecture
★ Minikube and kubectl - Local Setup
★ Kubernetes CLI - Main kubectl commands
★ Introduction to YAML Configuration File
★ Demo project: Deploying MongoDB and Mongo Express
★ Organizing components with Namespaces
★ Kubernetes Services
★ Kubernetes Ingress
★ Persisting Data with Volumes
★ ConfigMap & Secret Volume Types
★ Deploying stateful Apps with StatefulSet
★ Introduction to Managed Kubernetes Services
★ Helm - Package Manager of Kubernetes
★ Helm Demo: Install a Stateful Application on Kubernetes using Helm
★ Demo: Deploy App from Private Docker Registry
★ Extending the K8s API with Operators
★ Prometheus Operator Demo with Helm: Setup Prometheus Monitoring in
K8s

Demo Projects

K8s Demo Repo https://gitlab.com/nanuchi/bootcamp-kubernetes

Demo Project for Private https://gitlab.com/nanuchi/developing-with-docker


Repo
Check your progress... 1/8

Introduction to Kubernetes

❏ Watched video

Basic Concepts and Main K8s Components


❏ Watched videos

Useful Links:

● Managing K8s Secrets: https://blog.aquasec.com/managing-kubernetes-secrets

Kubernetes Architecture
❏ Watched videos

Minikube and Kubectl - Local Setup


❏ Watched videos
❏ Demo executed:
❏ Installed and setup Minikube
❏ Installed Kubectl

Useful Links:

● Installation guide for Minikube (Mac, Linux and Windows):


https://minikube.sigs.k8s.io/docs/start/
● Installation guide for Kubectl:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
Check your progress... 2/8

Kubernetes CLI - Main kubectl commands

❏ Watched video
❏ Demo executed:
❏ Created nginx Deployment
❏ Edited Deployment
❏ Created mongodb Deployment
❏ Inspected logs of a Pod
❏ Got shell of a running container - kubectl exec
❏ Deleted deployment
❏ Applied configuration file

Useful Links:

● Example commands repo:


https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/basic-kubectl-c
ommands

YAML Configuration File


❏ Watched videos

Useful Links:

● Configuration File:
https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config
/
● Example files repo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/kubernetes-con
figuration-file-explained

Best practices:

● Store Configuration Files with your application code or own Git Repository just
for the configuration files
Check your progress... 3/8

Demo project: Deploying MongoDB and Mongo Express


❏ Watched videos
❏ Prerequisite:
❏ Minikube cluster running
❏ Demo executed - Deploying MongoDB and MongoExpress:
❏ Created MongoDB Deployment
❏ Created Secret for Mongo Credentials
❏ Created MongoDB Internal Service
❏ Created MongoExpress Deployment
❏ Created ConfigMap for DB Server URL
❏ Created Mongo Express External Service

Useful Links:

● MongoDB Docker Image: https://hub.docker.com/_/mongo


● Mongo Express Docker Image: https://hub.docker.com/_/mongo-express
● Project Repo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/demo-kubernetes-
components

Organizing components with Namespaces


❏ Watched videos

Useful Links:

● Kubectx: https://github.com/ahmetb/kubectx#installation
Check your progress... 4/8

Kubernetes Services
❏ Watched video

Useful Links:

● Service: https://kubernetes.io/docs/concepts/services-networking/service/

Best Practice:

● Do NOT use NodePort Service Type for external connections. Use Ingress or Load
Balancer instead.

Ingress
❏ Watched video

Useful Links:

- Project repo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/kubernetes-ingress
- List of Ingress Controllers you can choose from:
https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/
- Ingress Controller Bare Metal:
https://kubernetes.github.io/ingress-nginx/deploy/baremetal/

Persisting Data with Volumes


❏ Watched video

Useful Links:

● Volume Types:
https://kubernetes.io/docs/concepts/storage/volumes/#volume-types
● Project demo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/kubernetes-volume
s
Check your progress... 5/8

ConfigMap & Secret Volume Types


❏ Watched video
❏ Demo executed:
❏ Created Mosquitto Deployment without any volumes
❏ Created ConfigMap component to overwrite mosquitto.conf file
❏ Created Secret component to add passwords file
❏ Adjusted Mosquitto Deployment to include volumes

Useful Links:

● Project demo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/configmap-and-sec
ret-volumes
● ConfigMap Volume Type:
https://kubernetes.io/docs/concepts/storage/volumes/#configmap
● Secret Volume Type: https://kubernetes.io/docs/concepts/storage/volumes/#secret
● Mosquitto Public Docker Image: https://hub.docker.com/_/eclipse-mosquitto

Deploying Stateful Apps with StatefulSet


❏ Watched videos

Introduction to Managed Kubernetes Services


❏ Watched videos

Helm - Package Manager of Kubernetes


❏ Watched videos

Useful Links:

- Install Helm: https://helm.sh/docs/intro/install/


- Helm Hub: https://artifacthub.io/
Check your progress... 6/8

Helm Demo: Install a Stateful Application on K8s using


Helm
❏ Watched video
❏ Demo executed:
❏ Created K8s cluster on Linode Kubernetes Engine
❏ Deployed replicated MongoDB (StatefulSet using Helm Chart) and
configured Data Persistence with Linode Block Storage
❏ Deployed MongoExpress (Deployment and Service)
❏ Deployed NGINX Ingress Controller as Loadbalancer (using Helm Chart)
❏ Configured Ingress rule

Useful Links:

● Project Repo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/linode-kubernete
s-engine-demo
● Create a Linode account ($100 - 60day credit with this link:
https://bit.ly/31p4GW2)
● Mongo Express Docker Image: https://hub.docker.com/_/mongo-express
Check your progress... 7/8

Demo: Deploy App from Private Docker Registry


❏ Watched videos
❏ Demo executed:
❏ Logged in to AWS Container Repository | docker login and create docker
config.json file
❏ Created Secret component
❏ Configured Deployment for demo app
❏ Pre-Requisites:
❏ Setup a Private Docker Repository (e.g. AWS Elastic Container Registry)
❏ Have a demo application (see provided one)

Useful Links:

● K8s Project Repo:


https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/pull-images-from
-private-reporsitory-in-k8s
● Sample NodeJs application Repo:
https://gitlab.com/nanuchi/developing-with-docker

Extending the K8s API with Operators


❏ Watched videos

Useful Links:

● Find Operators: https://operatorhub.io/


Check your progress... 8/8

Prometheus Operator Demo with Helm: Setup Prometheus


Monitoring on Kubernetes
❏ Watched videos
❏ Demo executed:
❏ Installed Prometheus Operator Helm Chart
❏ Accessed Grafana UI (configured port-forward)
❏ Accessed Prometheus UI (configured port-forward)

Useful Links:

● Prometheus Monitoring - What it is and how it works:


https://youtu.be/h4Sl21AKiDg
● Project Repo:
https://gitlab.com/nanuchi/bootcamp-kubernetes/-/tree/master/setup-prometheu
s-operator
More Resources...
More Resources

Best practices
● Configuration Best Practices:
https://kubernetes.io/docs/concepts/configuration/overview/
● 9 Security Best Practices:
https://www.cncf.io/blog/2019/01/14/9-kubernetes-security-best-practices-e
veryone-must-follow/

Cheatsheet
● K8s CLI Cheat Sheet: https://kubernetes.io/docs/reference/kubectl/cheatsheet/

You might also like