Why I moved my ERPNext sites to Kubernetes?
I self host frappe-bench to use ERPNext and I build small, focused non-frappe apps and services.
I extensively use ERPNext ReST API for achieving this.
I already had kubernetes cluster, apps deployed on it and basic knowledge about the platform.
Because of this, ERPNext on Kubernetes made sense to me.
Currently my production sites and few staging/development sites for my customers are on kubernetes.
What I needed? What I Achieved?
Easy management of ERPNext sites on Kubernetes: New site creation, backup, push backups to S3 compatible storage and restore from cloud are basic operations required for stress free use of ERPNext.
Consistent and reliable deployments: Docker commands that are built into production containers are tested daily as well as on PRs. This ensures reliability and better ability to debug when things are not working on production. I have caught a few migration, site creation bugs and reported them to core team due to these automated tests.
Database on Cluster: As MariaDB can be installed on cluster in Master-Slave configuration, Reports generation can benefit from it.
Storage on Cluster: Single
sites volume is shared across cluster as
Deployment pods can be spawned on any node and share the
Horizontal Scale for single “frappe-bench” like environment: Single “frappe-bench” needs to add or remove workers across nodes as per need. Use case where multiple apps concurrently fire automated request to ERPNext more than users using the system.
Easy access to logs and database for developers: Create kubernetes service-account/token for namespace, generate kubeconfig.yaml and revoke after use.
Why make it official vs keeping it third party?
I had my set of docker images and helm charts being built in CI pipeline. Shared here before.
Keeping it open but not on upstream is not beneficial for improvement of code and features.
Many more community members will review official PRs / git repositories over any third party code repositories.
Contribution to core will be used and improved by many people. Improvements are beneficial to everyone including me. Check the repositories, there are PRs and reviews by community contributors.
Last but not least, I can plug my company castlecraft for ERPNext + Cloud Native magic! Any opportunities are welcome!