gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
12.75k stars 1.22k forks source link

Support kubernetes in development environment #1585

Closed mehdihadeli closed 4 years ago

mehdihadeli commented 4 years ago

Hi, Does gitpod support Kubernetes in its development environment for hosting apps on Kubernetes nodes?

Kreyren commented 4 years ago

Like developing kubernetes environment and apps on gitpod?

I don't know afaik if it doesn't need /dev/kvm and root account then i don't see anything that would prevent that?

jankeromnes commented 4 years ago

Hi @mehdihadeli, Gitpod itself runs on Kubernetes, and can be deployed in a Kubernetes cluster alongside your Kubernetes apps in order to make your development flow truly cloud-native -- i.e. you can then launch a dev environment on any branch or Pull Request in seconds, and your workspace is directly connected to a dedicated Kubernetes staging deployment, so that you can start coding / debugging / testing / tweaking a live deployment almost immediately from any context (as opposed to tediously re-configuring a local clone all the time).

For example, we use Gitpod to develop Gitpod itself (a Kubernetes app), and our internal on-demand dev environments have direct Kubernetes access when launched. See it in action here: https://www.youtube.com/watch?v=dFMpXUsJcGM

jankeromnes commented 4 years ago

For deploying Gitpod in your own Kubernetes cluster, see also: https://github.com/gitpod-io/self-hosted/

mehdihadeli commented 4 years ago

@jankeromnes Hi, I don't want deploy Kubernetes on my own machine. so can I use Kubernetes commands (kubectl) on gitpod environment to deploy my repo app on gitpod Kubernetes cluster on the cloud?

sr229 commented 4 years ago

From what I understood, looks like he wants to try out developing for Kubernetes using kubectl (please @mehdihadeli correct me if I'm wrong).

We could add the following but I think this is more of the job of our friends from OpenShift.io.

mehdihadeli commented 4 years ago

ok thanks

jankeromnes commented 4 years ago

Hi @mehdihadeli! We use kubectl in Gitpod every day while developing Gitpod in Gitpod. 🙂 (Because Gitpod runs on Kubernetes.)

Every internal Pull Request gets its own dedicated Kubernetes staging deployment, so that you can see your modified Gitpod running live, and every PR also gets a prebuilt Gitpod dev environment that is pre-connected to the staging deployment, so that in one click, you can review a PR, see & test the deployment running live, use kubectl to inspect the different microservices (and maybe tweak their config live or try shutting one pod to see what happens).

This is a workflow that I think would be super valuable for many Gitpod users, so we're working on a demo where hopefully you'll also be able to use a pre-connected kubectl in a Gitpod workspace. More news on that soon. 🙂

mehdihadeli commented 4 years ago

@jankeromnes thanks for your explanation, yes it's better creating a sample or a document for using this feature for easy to use

jankeromnes commented 4 years ago

Agreed. We're on it. :)

DanielHabenicht commented 3 years ago

@jankeromnes is there a guide or article already published?

3goats commented 3 years ago

+1 for this

realsama commented 2 years ago

Is something like Okteto possible with GitPod?

axonasif commented 2 years ago

@shepherd1530 see:

loujaybee commented 7 months ago

Hey folks, just coming back to this for others who are googling, we recently published a new docs page:

https://www.gitpod.io/docs/integrations/kubernetes

This page covers common use cases and ways to develop Kubernetes applications in Gitpod:

Please do check it out, and let us know if you have any questions 🙏