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

feat(ops): Kuberenetes #204

Closed
wants to merge 1 commit into from
Closed

feat(ops): Kuberenetes #204

wants to merge 1 commit into from

Conversation

zacanger
Copy link
Contributor

@zacanger zacanger commented Jun 7, 2019

Closes #116
Depends on #220

Open to PRs/patches! I'm still very new to Kubernetes, so please shout at me if you see any issues.

This is tested with microk8s. If anyone would be interested in testing on more production-like infrastructure I'd definitely welcome that. Otherwise, it should be ready to merge.

As mentioned in the comments, it would be neat to have a Helm chart, but with the Helm 2 to Helm 3 churn right now, I think that's something for the future.

@zacanger zacanger changed the title Feature/k8s Kubernetes Jun 7, 2019
@krainboltgreene
Copy link

@zacanger
Copy link
Contributor Author

zacanger commented Jun 7, 2019

Oh yeah, I definitely know. I think running postgres, redis, etc. in kubernetes should be an option here, but we should also allow it to work with externally hosted services (like RDS).

@krainboltgreene
Copy link

krainboltgreene commented Jun 7, 2019 via email

@zacanger
Copy link
Contributor Author

zacanger commented Jun 8, 2019

I'll be honest, I'm a total postgres noob, but I'll take your word for it. Is that something we should consider adding?

@zacanger zacanger mentioned this pull request Jun 8, 2019
@krainboltgreene
Copy link

krainboltgreene commented Jun 8, 2019 via email

@zacanger
Copy link
Contributor Author

zacanger commented Jun 9, 2019

@krainboltgreene I ended up removing Postgres from this entirely, since that seems like a decision admins should make (I know I'll end up just using RDS).

@zacanger zacanger mentioned this pull request Jun 9, 2019
@zacanger zacanger marked this pull request as ready for review June 9, 2019 22:17
@ceejbot
Copy link
Collaborator

ceejbot commented Jun 9, 2019

I can look at this, but I'm pretty sure I don't know enough to give it a meaningful review.

ETA: I generally don't want stateful things handled by k8s, as Kelsey Hightower's thread suggests. I see many potential users as wanting to hook up with RDS or some other hosted postgres service just to avoid having to do backups, upgrades, and other maintenance themselves. Same with redis, though there's no long-lived state in it in this design, and redis is operationally a lot nicer than postgres.

@zacanger
Copy link
Contributor Author

zacanger commented Jun 9, 2019

That's pretty much how I feel about it. I am not a DBA and don't want to be one, and (maybe I'll end up being wrong about this, but) I don't think the target admin type user here is a DBA, or even an ops person. It's probably someone who cares about Node a lot, and may or may not have any database or operations experience.

Edit: I'm going to ask a coworker for a once-over tomorrow, since we have some extremely knowledgeable folks leading the move to k8s at $day_job.

@krainboltgreene
Copy link

I know quite a bit about this surface of application development and I would love to do a pair review to transfer the knowledge.

@krainboltgreene
Copy link

If I understand the misc/k8s directly I believe the current ecosystem leans towards using helm to do this job. Many many people will expect to be able to helm install entropic.

@zacanger
Copy link
Contributor Author

I thought about using Helm, but with Helm 3 coming soon I didn't know if it would be worth doing things twice. Once Entropic is more stable I think it would make sense to try to get charts into the official helm/charts repo, though.

@krainboltgreene
Copy link

Agreed, and not having helm shouldn't stop this PR.

@Julusian
Copy link

Why are you converting to yaml here? The Kubernetes api accepts json too, but does recommend yaml. As this project is really against yaml, why not just keep it as json?

https://kubernetes.io/docs/concepts/configuration/overview/

Write your configuration files using YAML rather than JSON. Though these formats can be used interchangeably in almost all scenarios, YAML tends to be more user-friendly.

@zacanger
Copy link
Contributor Author

zacanger commented Jun 12, 2019

Good point. I was converting them to YAML because that's much more common in the ops world, but it shouldn't really matter since it's already uncommon to write them in JS. I think I'll change that.

@zacanger zacanger mentioned this pull request Jun 15, 2019
@zacanger zacanger changed the title Kubernetes feat(ops): Kuberenetes! Jun 18, 2019
@zacanger zacanger changed the title feat(ops): Kuberenetes! feat(ops): Kuberenetes Jun 18, 2019
@zacanger zacanger mentioned this pull request Jun 22, 2019
Copy link
Collaborator

@chrisdickinson chrisdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! It LGTM, as far as I can tell – I'm in the same boat as @ceejbot!

I'm going to add this to the merge queue & test it locally when merging. 💚

@chrisdickinson chrisdickinson added the merge queue PR is ready to be tested locally, fixed up, and merged label Jun 25, 2019
Copy link
Contributor

@1stvamp 1stvamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great solution, and works well on microk8s and GKE.

There are a few rakes such as if you want to use your own psql deploy, and the usual issues of deciding which NodePorts you need exposed.

👍 to merging this now, and expanding on the doc as part of another PR with more steps to bring up a basic env - this would also make a good blog post.

@chrisdickinson
Copy link
Collaborator

Thanks for reviewing, @1stvamp! I've merged this in 6373162.

@zacanger
Copy link
Contributor Author

zacanger commented Jul 4, 2019

Thanks @1stvamp and @chrisdickinson!

@zacanger zacanger deleted the feature/k8s branch July 4, 2019 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge queue PR is ready to be tested locally, fixed up, and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes support
7 participants