The Doppler Quarterly Spring 2018 | Page 65

A service is defined and deployed using a configuration file written in YAML (YAML Ain't Markup Language). The deployment is defined in a declarative style where the end state is specified and K8s does its best to maintain this state. For example, you can define a service where the deployment must have eight Pods running at all times across the cluster. If a Pod fails, K8s will do its best to schedule another Pod to maintain the defined end state of the deploy- ment (i.e., eight running Pods). The K8s master node will also try to schedule Pods on worker nodes as efficiently as possible across the cluster, ensuring even load distribution and resiliency. Kubernetes Master API Server Controller Manager Users Scheduler Developer / Operator etcd Kubelet cAdvisor Pod Pod Kube-Proxy ... Pod Kubelet ... Pod cAdvisor Pod Kube-Proxy ... Pod Plugin Network (e.g. Flannel, Weavenet, etc.) Kubernetes Node Kubernetes Node Figure 3: Kubernetes architecture Helm So we have identified a system for solving the problem of automatically sched- uling and ensuring resiliency in this distributed cluster, but how would you describe the application you want to deploy? You can imagine that the YAML configuration can get rather complex, even for a relatively simple website like the Sock Shop where you need to specify ConfigMaps, services, Pods, per- sistent volumes, etc. This is where Helm comes in. Think of Helm as a package manager for K8s, analogous to what yum and apt are to Linux. Similarly, Helm Charts are K8s packages analogous to debs and rpms. Helm gives developers a way to package their entire application into Charts, which can be installed on a K8s cluster with a single command. Not only does Helm give you an effective package manager for K8s, but it also is a way to package and publish your appli- cations to public repositories for others to leverage. Developers can find hun- dreds of curated and stable Charts, packaging a variety of useful applications ranging from databases (MySQL, MongoDB) to Web publishing applications, such as WordPress. SPRING 2018 | THE DOPPLER | 63