Kubernetes and Helm Deployments Session One
Kubernetes and Helm Deployments Session One
Helm
- Helm is a package manager
- To learn helm, the first things you should start learning is kubernetes resources
- Helm chart supports almost all of the kubernetes resources, which is impressive
Flavors of Kubernetes
- EKS on amazon
- on-prem
- Google cloud
Helm Chart: Mapping information
- Ingress Controller: defines what network is enabled and describes how to send traffic from external world to the current cluster
- Rest of the charts: what API and features are enabled, you can even enable beta features
- You can deploy all of blueapron.com in one single package
Helm common charts
- templated, abstracted common logic
- shared helm charts
- all our helm charts rely on this chart
Defaults
- Memory
- CPU
- Instance - How many replicas do we need to deploy to a cluster
- Hostname
Overrides
- Works like CSS, by convention over configuration
Where does docker fitting into all of this?
Kubernetes doesn’t require docker, but it’s flexible enough to support the docker environment
What is a deployment
- creates
replica-sets
- Kubernetes provides
stateful-set
s. You can ask kubernetes not terminate the previous replica-set. As a best practice here, it’s always better to deploy the persistentance layer elsewhere such as RDS. - Ingress, to route the external traffic to it - between pod and deployment replica-sets there is this layer of abstraction
DNS components
- DNS in AWS, Kubernetes, and in console in legacy
- Currently uses IP Table, needs to be modernized
What do you need to understand as a non-DevOps Application Developer?
Developers need to understand
- Docker
- Pod - A group of containers that share resources. They will be deployed together, and allow them to communicate
How do we start a new application?
External example
Internal example
Use wms-server was a starter template
- First build a Dockerfile -
pro-tip
: optimize until you reduce the container to a smaller size - Create a Jenkinsfile
- Jenkins file is written in a combination of Groovy and Jenkins language. Blue Apron provided an superset of features, and you can find the documentation of this superset here
- Helm
See the helm folder in each project
- ingress you almost never have to touch
- replace the application name in the Chart.yml and in each process yaml. The web process yaml is the Rails application.
- Knobs Q: How do we increase the number of replicas, memory, and CPU? A: You would reference the values inside a cluster. CPU is unlimited right now
Example of a cluster:
us-east-1/blue
Upcoming Features
- removal of Jenkins Legacy EKS references
- improved syntax sugar
- IP Table modernization
Possibly upcoming features
- moving linkerd to istio, and into its own cluster
Covered in This Class
- High-level overview of Helm as it related to Docker and Kubernetes
- A case study of a Rails application
wms-server
, and how kafka, sidekiq, and rails process are deployed using helm in this application - Some knobs on how to tune the process memory and instance
Next Class
- Further explain the health check and how they’re used
- Perhaps go over two other flavors of deployment, one ember and one react
- Develop and deploy
jenkins-ci-library-test
together - See how the staging and production process works in the Jenkins web UI