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

Topic missing from all K8s #41

Closed
frob opened this issue Aug 3, 2022 · 5 comments
Closed

Topic missing from all K8s #41

frob opened this issue Aug 3, 2022 · 5 comments
Labels

Comments

@frob
Copy link

frob commented Aug 3, 2022

How does one use K8s for development? There are many other tools that have been launched to try and solve this problem but they only seem to hide how the sausage it made. I am referring to tools such as: lando, ddev, lagoon, and others.

What I need is someone to publish a guide on how to use K8s as a developer of a Drupal site.

@geerlingguy
Copy link
Owner

Thanks for the issue; I would not recommend using k8s to develop a site; instead you could use a local development tool, or build something using k3s or more likely minikube or something similar that's geared towards local development.

But even there, running Drupal in a local development environment is going to be a lot nicer since Kubernetes is not really built for local dev work.

@frob
Copy link
Author

frob commented Aug 9, 2022

That really is the question; how does one develop a complicated site when hosting is being done on kubernetes. Back when everything was VMs it was easy to know the environment of final hosting matched that of the development environment because we could use (mostly) the same ansible scripts to build the local VM as the machine that would be hosting. This is a really confusing topic.
I was hoping to peak your interest enough to want to tackle it but I understand you've been involved in more interesting things.
The best thing I have found for local development is docker compose but that isn't how we will be deploying anything.

@geerlingguy
Copy link
Owner

geerlingguy commented Aug 9, 2022

The key would be to make sure the internal container structure is set up to be reproducible in prod and local (and other environments). And there's always a grade to how much you need each environment to match.

For some applications, getting a proxy layer (Varnish/Nginx, Ingress structure, etc.) is all important to how it runs, so you have to get all that working locally—which can be tough depending on what kind of computers and local access developers get.

For many, just having a reproducible database and application (PHP+Apache, or PHP-FPM+Nginx) container setup could be enough where you could deploy that inside k3s locally, and whatever kubernetes setup you have running in prod. Some people use Helm for that, some people Ansible, some people shell scripts...

And I know some people use some tooling to convert a docker-compose.yml file (that they use local) into K8s deployments (that they push to the server), though that seems a lot more fragile and prone to headaches.

One of the hardest bits for local dev (besides ingress, which can be a pain) is the sharing of the local Drupal files to your local IDE/dev tooling. Some people use some sort of shared volume plus a special mount that's only run in the dev k3s environment. Some people use a form of SSH to reverse mount it from the container to their computer... that can be kinda complex too. Or it could be an NFS volume mounted into the container, and that's usually easiest on Linux but can be done on Windows or Mac too.

@stale
Copy link

stale bot commented Dec 24, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Dec 24, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants