Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try k8s #24

Open
sebbacon opened this issue Feb 12, 2020 · 3 comments
Open

Try k8s #24

sebbacon opened this issue Feb 12, 2020 · 3 comments

Comments

@sebbacon
Copy link
Contributor

#19 showed Google Cloud Run isn't going to be a goer.

I'm less leery than I used to be about using kubernetes, given there's plenty of k8s-as-a-service options out there.

I've tried DigitalOcean's which is priced at the same rate as their normal droplets and it seems quite nice.

The Google Cloud Kubernetes Engine is another option but I kept getting gnomic error messages when I tried it.

The process of getting a minimal deployment going is quite easy. You make a YAML configuration that describes your desired deployment (here's the one I made), then run

kubectl apply -f config.yaml

and then

kubectl expose deployment hello-world --type=LoadBalancer --name=my-service
@sebbacon
Copy link
Contributor Author

Next steps:

  • Automate with Github Actions
  • Check all the k8s settings; what can we use to spin down an instance? See autoscaling for more.

@sebbacon
Copy link
Contributor Author

Note autoscaling has a dependency on metrics-server

@sebbacon
Copy link
Contributor Author

sebbacon commented Feb 17, 2020

Autoscaling to zero is the blocker here. We want to reap processes which are no longer being used.

There are some indications this would be possible. For example, I found a recent k8s update supported zero scaling for external metrics; but then you have to set up a prometheus service (or stackdriver) to log request activity, and configure the autoscaler to inspect that service, and it's all quite hairy. Another nice alternative appeared to be OpenFaaS, which claims to support autoscaling out of the box (using various k8s bits and pieces under the hood) but the installation story for their cloud service is somewhat unpleasant.

I also considered Google App Engine Standard edition, which scales to zero for you, but this requires you to use their runtimes and we have some pretty exotic stuff like R-in-python which don't look supported. Google App Engine Flex edition will only scale to a minimum of one.

All in all, it seems like there's no convenient service for autoscaling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant