Hey everyone, I'm searching for a solution that will help us manage the lifecycle of ephemeral instances of a stateless web application accessed by users. We want to create a self-service experience where users can easily set everything up themselves. We are on EKS with AWS ALB Ingress to expose our applications. Here's what we're thinking:
- Users would go to `platform.internal.example.com` and specify details like `environment name`, required resources (CPU, memory, optional GPU), and Docker image.
- The system would generate Kube templates to create pods, mount a service account for IAM permissions, and expose them via routing like `platform.internal.example.com/$environment_name/`. This approach might be more efficient than waiting for DNS.
- Once the templates are deployed and the pod is confirmed as healthy, users can access their app instances. After a period of inactivity, the pod should be cleaned up, possibly after sending a SIGTERM after an hour.
- We might want to support Websockets in the future as well.
We're not looking for a full Internal Developer Platform; we just need a way to manage instances of our web application on EKS. I've heard Port might be an option, but would love to know if there are alternatives. I don't think building something custom would be too bad considering our needs. Thoughts?
2 Answers
I’m skeptical that Port will meet your needs without a lot of tweaks. I suggest starting with a 'namespace on demand' for your users. It helps keep things organized. You also don’t need to worry about TTL in a strict sense, but having an expiration for unused resources can save headaches later. Tools like Capsule or Kube-Janitor could help with this. Helm is great for templating and automating installations. Check out Kubeapps or Helm Dashboard for ease of use. Just remember, putting apps to sleep might require some extra work like using Snorlax for timing.
Keep your users involved in managing their Kubernetes space—transparency can go a long way!
I tackled a similar issue at my job by creating a comprehensive app for internal use that lets staff spin up instances. Start simple, but you can expand this by integrating with ArgoCD using their Plugin Generator. It streamlines the process where the API pulls values from a database and renders them in the right format for ArgoCD applications. It’s a neat solution if you decide to go that route!
That's a clever approach! But I agree, building in-house might be necessary, as this feature could benefit many.
Absolutely! ArgoCD handles a lot of the work, especially with parameterized Helm templates and ApplicationSets. You just need a front-end for input.
Thanks for the suggestions! I’ve heard Port can be a heavy lift, so this advice is super valuable.