Infrastucture Modernization in Kubernetes​

Client:

Khalti Digital Wallet

Category:

Infrastructure modernization

Duration:

3 months

Website Link:

khalti.com

Project overview :

Khalti, a leading digital wallet in Nepal, has modernized its infrastructure by adopting a Kubernetes-based containerized architecture. This transformation has significantly enhanced the platform’s reliability, scalability, and security.
 
This shift began with creating optimized, secure container images for all of Khalti’s backend services, as it operates within a multi-service architecture with its core banking system at the heart of financial decisions. Automated pipelines were developed for the setup and configuration of the Kubernetes cluster, using Ansible, Bash scripts, and Jenkins. Helm charts were crafted to deploy multiple services across Khalti’s ecosystem, and GitHub Actions were implemented to build container images, run security and testing jobs, deploy tasks, and manage cluster initialization and Helm release upgrades. Following the initial service migration, we also successfully transitioned Khalti’s core banking system after thorough testing and validation. To ensure smooth operations in Khalti’s high-traffic production environment, additional measures were implemented, such as self-healing probes, pod lifecycle management, and deployment strategies for near-zero downtime deployments. We also introduced event-driven auto-scaling for all services, secured cluster access with RBAC, and created automation jobs for RBAC operations. With multi-site and multi-cluster management, we enabled deployments across clusters through single GitHub Action jobs, integrated various add-ons, and implemented Kubernetes service discovery for inter-service communication. Numerous jobs and automations are managed via Kubernetes cron jobs, enhancing efficiency and scalability across Khalti’s infrastructure. With this transformation, Khalti’s system has achieved its goal of greater reliability, resilience, and scalability to efficiently manage high traffic and deliver consistent, dependable service across its entire ecosystem.
 
 

Key aspects of modernization

Containerization

Optimized container images were created for all backend services, including the core banking system.

Automation

Automated pipelines were implemented using Ansible, Bash scripts, and Jenkins to streamline cluster setup and configuration.

Orchestration

Helm charts were used to deploy multiple services, and GitHub Actions managed various tasks, including image building, testing, and deployment.

Multi-Cluster Management

A unified approach was adopted to manage multiple clusters, enabling efficient deployments and centralized control.

Operational Excellence

Self-healing probes, pod lifecycle management, and zero-downtime deployments were implemented for smooth operations. Event-driven auto-scaling and robust security measures were also incorporated.