Running Kubernetes
Adam Hamsik
DevOps/Cloud Engineer
www.pixelfederation.com
Kubernetes deployment on AWS
TL;DR Summary
- Kubernetes deployment tools
- Kubernetes infrastructure components
- Pods, Services, Endpoints
- Workloads
•
- Demo
www.pixelfederation.com
1. Running Kubernetes version 1.9 on AWS
2. Deployed with Kops and Terraform
3. If possible we use managed services (RDS, Elasticache)
a.
4. Prometheus/Grafana used for monitoring
5. Elk stack for log gathering
Kubernetes deployment on AWS
Kubernetes @ Pixel
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes deployment tools
Multiple available alternatives for kubernetes
deployment
1. Kops (AWS, GCE, digitalocean)
a.
2. Kube-up
a.
3. Kubespray
a.
4. Kubeadm
www.pixelfederation.com
Kubernetes deployment on AWS
Using Kops for Kubernetes Deployment
1. Cloud Architecture
a.
b.
2. Highly available deployment
a.
b.
3. Cluster Updates
a.
i.
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes AWS architecture
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
1. Kubernetes master
a.
b.
i.
c.
i.
d.
2. Node
a.
b.
i.
c.
i.
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes Components
www.pixelfederation.com
Addons
extend core Kubernetes functionality
1. External-dns
a.
2. Cluster-autoscaler
a.
3. Prometheus
a.
Kubernetes deployment on AWS
Kubernetes Addons
www.pixelfederation.com
1. Trust your health-checks
a.
2. Stateless applications
a.
b.
3. One process per container
a.
4. Scaling
a.
b.
Kubernetes deployment on AWS
Running applications on Kubernetes
www.pixelfederation.com
1. Use ingress controllers (traefik, nginx, haproxy, AWS ALB)
a.
b.
c.
2. Plan your updates native support for
a. Recreate
b. Rolling Update
c. Blue/Green,Canary,A/B needs to be scripted
3. Package your manifests with HELM
Kubernetes deployment on AWS
Running applications on Kubernetes vol. 2
www.pixelfederation.com
Kubernetes deployment on AWS
Application Pod with sidecar container
www.pixelfederation.com
1. Package manager for Kubernetes manifests
a.
2. Use templates to develop reusable charts
a. Sharing charts is simple
3. Supports rollback to previous application versions
a.
4. Use hooks to manage/orchestrate complicated scenarios
Kubernetes deployment on AWS
Kubernetes Helm Package manager
www.pixelfederation.com
1. Pods
a. group of one or more containers running on a same physical host
2. Services
a. A Kubernetes Service is an abstraction which defines a logical set of
Pods and a policy by which to access them
b. Use selectors/labels to select right pods
3. Deployments, Stateful sets, Daemon Sets
a.
Kubernetes deployment on AWS
Kubernetes Service objects
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes application architecture
www.pixelfederation.com
Kubernetes deployment on AWS
Questions ?
www.pixelfederation.com
Kubernetes deployment on AWS
Thanks !
ahamsik@pixelfederation.com
www.pixelfederation.com
Encapsulation based CNI
1. Flannel
2. Weave Net
Routing based CNI
1. Project Calico
2. Kube-router
3. amazon-vpc-cni-k8s
Kubernetes deployment on AWS
Kubernetes networking
www.pixelfederation.com
Kubernetes deployment on AWS
Kubernetes networking flannel
www.pixelfederation.com
1. Routing based CNI
a.
b.
c.
d.
e.
Kubernetes deployment on AWS
Kubernetes networking calico

Kubernetes @ pixel