Blue kubernetes boxes
Cover image for olawale

Omosekeji Olawale Verified userVerified user

Technical Support Engineer

Appsmith

Running multiple pods on Kubernetes in Appsmith - Part 1 (One server restarting another...)

In today's rapidly evolving world of software development, Kubernetes has emerged as a go-to platform for managing containerized applications at scale. With its ability to orchestrate and automate container deployment, scaling, and management, Kubernetes has become the backbone of modern cloud-native architectures.

By seamlessly integrating with Kubernetes, Appsmith empowers developers to deploy and manage their applications efficiently.
However, like any complex system, running multiple pods on Kubernetes within the context of Appsmith can present its challenges. This article won't deal precisely with how to setup various pods on Kubernetes (yeah, I lied in the title); rather, it (and upcoming articles in the series) will delve into the intricacies of dealing with errors when running various pods on Kubernetes in Appsmith. We will explore common issues developers encounter and practical strategies to identify, troubleshoot, and resolve them.


Through a comprehensive understanding of these error scenarios and their solutions, you and your developers can enhance your ability to build robust and fault-tolerant applications on Appsmith, leveraging the power of Kubernetes to its fullest extent.
So, whether you're a seasoned Kubernetes user or just starting your journey, this article will serve as a valuable guide to navigate the intricate world of multiple pods on Kubernetes in Appsmith, enabling you to overcome hurdles and deliver reliable and scalable applications.

 

Scenario & Solution

Suppose you've successfully run Appsmith with one pod, but then you decided to add a second pod. For some reason, both share the same local Postgres data directory. This could cause one server to restart the other, and the reason for this is that the PID is different on each pod. 

How do you fix this?

  1. Run helm get values appsmith -n default > installed_values.yml
  2. Add APPSMITH_ENABLE_EMBEDDED_DB: 0 under applicationConfig header like: 
    applicationConfig:
     

        APPSMITH_ENCRYPTION_PASSWORD: ....
     

        APPSMITH_ENCRYPTION_SALT: ....
     

        APPSMITH_ENABLE_EMBEDDED_DB: 0 
  3. After that, run helm upgrade -i <chart_name> appsmith-ce/appsmith -f installed_values.yaml  if you're on the community edition 
  4. If you're on the enterprise edition,  run helm upgrade -i <chart_name> appsmith-ee/appsmith -f installed_values.yaml

By following the steps highlighted above, everything should be working as expected. 
See you in the next one!!!