Running Docker and K8S Workloads on Cloud (AWS and Azure)
Docker
Docker in Azure
- Azure Container Registry:
-
This is Docker Registry on Azure Cloud
-
- Azure Container Services: No longer supported by Microsoft
- Azure App Services:
- Developer will write code and we will have Dockerfile per Application/Service
- You can Deploy applications in Azure App Services from Dockerfiles
Docker in AWS
- Elastic Container Services (ECS):
- EC2 Machine Based:
- Create a ec2 machine with particular ami
- You can group ec2 machines with that image to a cluster
- Create Task Definition with Docker Commands
- These tasks can be executed as servcies
- Paying bill for ec2 machines
- Fargate:
- Paying only for containers which you are running.
- EC2 Machine Based:
- Elastic Container Registry (ECR):
- Elastic BeanStalk
Kubernetes on Cloud
- Kubernetes has master and worker nodes.
- Cloud providers offerings such as AKS/EKS/GKE
- master nodes are managed by Cloud provider
- Authentications integrated with cloud authentications (AWS => IAM, Azure => AAD)
- Monitoring and logging integrated with Cloud Solutions
- Cloud provider storage options
Azure Kubernetes Services (AKS)
Creating AKS Cluster
Amazon Elastic Kubernetes Services (EKS)
Storage
-
Even in the case of k8s we want the container lifecycle to be separated from Storage/Volume Life cycle
-
K8s has majorly the following options
- Volumes
- Persistent Volumes
-
Refer here for AKS
Docker & Kubernetes DevOps Workflow.
Important Activities
Exercise
-
Create a Game of life Deployment with autoscaling enabled for pods if cpu utilization is greater that 80%. Tomcat webapps or logs folder should be persisted. Ensure your are storing docker image in DockerHub or ACR or ECR
-
Create a Game of life Docker Container which takes service ip address as input while running the container. Prove this on Kubernetes
-
How to Submit Exercise?
- Write a mail to qtdevops@gmail.com with your git hub repository containing the YAML and Dockerfiles. You can also use attachments.
- In the mail enter your gmail id & you will have a hangout call.