Kubernetes and its case study with Spotify

Sarthak Agarwal
3 min readApr 6, 2021

Kubernetes ,i.e, also known as K8s, is an open-source automation tool for the deployment,scaling and management of the container application or we can say the docker images we have on which our app is running.Also Kubernetes is a portable and extensible platform for container orchestration.

Uses of Kubernetes

Mainly kubernetes is used to group the containers which make it easy the developer to handle the Pods(in kubernetes world images are known as Pods) or manage the containerized workloads through both declarative as well as automated configuration.

Benefits of Kubernetes

  • Secret configuration management.
  • Automated rollbacks and the rollouts of Pods.
  • Runs up the distributed system resiliently.
  • Self deployment incase a pod is deleted somehow.
  • Self healing of Pods.

On a report, it has been counted that presently around 2429 companies are using kubernetes for solving their technical use cases. Name of some companies that use kubernetes are Google, Shopify, Spotify, Udemy, Slack, Robinhood, Delivery Hero, Nubank, Stack

And many more…..

Case Study of Spotify

Challenges Faced

This company was launched in 2008 and now there are around 200 million active users in the world those who using spotify. As they have 200 million users so it was a hard job to deliver the best listening experience to all the consumers. So what they want is the best user experience. The need was also for the reduced cost, more added velocity and also they have to stand in the market.

How the challenges were solved

In 2017,they saw a abrupt change in the community those who are using kubernetes. And kubernetes also had more features than the Helios(the tool they were using).So the Kubernetes was introduced as the tool to the team as it fits nicely as a replacement with Helios. Initially during the migration, the services were running on both Kubernetes as well as Helios so they can migrate the risks. After whole deployment, the fleet had less need to focus on the manual provisioning and they have to give more time on the features delivery.

The bang after using the tool→ Kubernetes

Whole team spent 2018 solving the technical issues to get the best output. The focus was also to enhance the delivery features on the top of spotify. They were also able to use the lot of Kubernetes APIs and extensible features to support and interface the infrastructure due to which the integration for the system was a bit easy for them. After this setup, teams had not to wait for an hour, and now they can create a new service or the Pods within few minutes or seconds. Features like bin-packing and multi-tenancy capabilities, CPU utilization was also improved on an average.

Some commands used in Kubernetes

  • To check server is active or not we have command as→ minikube status
  • To check how many pods are running we have the command→kubectl.exe get pods
  • To launch a Pod we have command as→kubectl.exe run <Pod_name> --image=<image_name>
  • To create a Pod and deploy it→kubectl.exe create deployment <Pod_name> --image=<image_name>
  • To know details about pod→kubectl.exe describe pods
  • To get WebUI → minikube dashboard

We can also use YAML code for various use cases in the Kubernetes and make the code in the way we want.

--

--

Sarthak Agarwal

Cloud & DevOps Enthusiast ★ARTH Learner ★ AWS ★ GCP ★ Jenkins ★ K8S ★ Ansible ★ MLOps ★ Terraform ★ Networking ★ Python