Ginbits uses K8s: Exemplifying Efficiency With Kubernetes + Prow



Author: Kostas Papanikolaou

Categories: Technology

Ginbits uses K8s: Exemplifying Efficiency With Kubernetes + Prow

From the moment Ginbits was “conceived”, the words efficiency and automation started creating our essence. We are a company that develops state-of-the-art applications with cloud-based infrastructure that answer hard questions within massive industries. Therefore, we knew we would encounter high traffic spikes, ever-evolving markets, and new trends, as well as increasing demand.

With efficiency and automation in mind, we did not have to think long before opting for Kubernetes aka k8s. When it entered GitHub, it became the “hottest” way to deploy workloads in the cloud.

Now, Kubernetes is the most efficient way this happens. Combining the two most important aspects of what we do, Kubernetes was the clear choice for automated application deployment, scaling, and management for all our products.

Given that we provide tech exposure to every member at Ginbits, we use technologies that we know are going to provide solutions. We steer clear of buzzwords and techs that are not going to provide us the efficiency we want for our applications. We focus on getting things done with the best and most efficient tools available.

What is Kubernetes?

Simply put, Kubernetes or k8s is a state-of-the-art system that allows the automated deployment, scaling, and management of containerized applications. By grouping containers that make up applications into logical units, K8s allows developers to seamlessly manage their apps.

Originally designed by Google and now operated by the Cloud Native Computing Foundation, k8s is the standard way of deploying workloads in the cloud. Tailored around the needs of companies that need high availability, cloud-agnostic characteristics, easy extensibility, and self-healing, k8s is the way to go.

To put things into a clear perspective, Kubernetes offers the following:

  • Compute scheduling – Considers the resource needs of containers and finds the right place to run them automatically
  • Self-healing – In the case of a container crashing, a new one is automatically created to replace it
  • Horizontal scaling – Observes CPU or custom metrics and can add or remove instances as needed
  • Volume management – Manages the persistent storage used by applications
  • Service discovery and load balancing – IP address, DNS, and multiple instances are all load-balanced
  • Automated rollouts & rollbacks – Monitors the health of new instances during updates and can roll back to the previous version automatically if a failure occurs
  • Secret and configuration management – Managers application configuration and secrets

K8s offers companies the freedom to take advantage of on-premises, hybrid, or public cloud infrastructure. That way, it allows us to work effortlessly into moving workloads where it matters.

Kubernetes can scale without increasing your ops team, thanks to it having been designed on the same principles which allow Google to run billions of containers per week.

But why k8s?

As mentioned above, Ginbits develops applications on a cloud-based infrastructure that answer hard questions. Equally hard are the issues that Kubernetes is able to “answer” thanks to its features.

Building applications that will encounter high traffic spikes and high demand, within markets that evolve constantly and within which new trends occur daily is highly demanding.

Kubernetes allows us to benefit from:

  • High availability
  • High scalability
  • High performance

These three when combined they allow applications to support the traffic of millions of clicks. The scalability potential that Kubernetes provides offers companies the capacity to expand and adapt to new trends easily and quickly.

Finally, the high performance makes the work of everyone using k8s agile, allowing them to deploy, scale, and manage apps seamlessly, and most importantly, automatically.

We are aware that the world of app building includes and epitomizes several fundamental concepts. One that comes to mind is “Continuity”. The ability to be consistent, ever-working even, is what separates good apps, from world-changing applications.

Thanks to Kubernetes, we are able to get continuous deployment and of course, continuous integration.

Solving the CI/CD Issues

As all developers know, nothing complex can be 100% perfect. After all, issues are what make technology innovate further. When a fundamental issue within the CI/CD domain of Kubernetes occurred, the k8s community worked hard and brought forth “Prow”.

Named after the word that describes a ship’s front end, always above water, Prow did not arrive as just a solution, but as an exemplifier of why and how Kubernetes is the perfect platform for companies to execute CI/CD at scale.

The need to execute over 10 thousand CI/CD jobs per day, across more than 100 repositories in GitHub organizations inspired the creation of Prow.

Designed and built on a microservice architecture that is native to k8s, Prow has several components that integrate with one another, as well as many standalone components that are more of a plug-n-play nature.

Examples of main building blocks for Prow include:

  • Hook – Acts as an API gateway that intercepts all requests from GitHub, then creates a Prow job custom resource that reads the job configuration and calls any specific plugins if needed
  • Plank – The job controller of Prow that processes Prow jobs created by Hook, and then creates a Kubernetes pod for it to run the tests
  • Deck – The UI for the history of jobs that ran in the past or are currently running
  • Horologium – The component that processes only periodic jobs
  • Sinker – It is responsible for cleaning up old jobs and pods from the cluster

Easy to set up at any scale of infrastructure and suitable for projects of all complexities, Prow provides GitHub automation in the form of chat-ops via /foo style commands, policy enforcement, and automatic PR merging.

Making the Kubernetes-GitHub Pairing Possible

In its README file within GitHub, Prow is described as a “system”. The Kubernetes Testing SIG describes Prow as “a CI/DC system built on Kubernetes for Kubernetes that executes jobs for building, testing, publishing, and deploying.”

It takes GitHub automation to the next level and makes Kubernetes and GitHub pairing a possibility and reality.

Given that Prow compliments Kubernetes and has efficiency and automation written across its “job description”, Ginbits uses Prow to pair k8s with GitHub and get the best out of one of the most important CI/CD systems ever created.

Tags: app deployment, app management, app scaling, applications, apps, GitHub, k8s, Kubernetes, Prow