Code Monkey home page Code Monkey logo

Comments (5)

geerlingguy avatar geerlingguy commented on June 19, 2024

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.

from kubernetes-101.

frob avatar frob commented on June 19, 2024

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.

from kubernetes-101.

geerlingguy avatar geerlingguy commented on June 19, 2024

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.

from kubernetes-101.

stale avatar stale commented on June 19, 2024

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.

from kubernetes-101.

stale avatar stale commented on June 19, 2024

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.

from kubernetes-101.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.