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

Create a command to deploy frontend applications in Kubernetes #1011

Open
aabedraba opened this issue Dec 7, 2022 · 6 comments
Open

Create a command to deploy frontend applications in Kubernetes #1011

aabedraba opened this issue Dec 7, 2022 · 6 comments

Comments

@aabedraba
Copy link

Would be cool if we enabled frontend developers to deploy their containerized web applications simply with Kusk.

A command like

kusk deploy pages --container dockerhub/containername

Under the hood it would create a deployment and expose it

kubectl create deployment web-app --image=usernameweb-application
kubectl expose deployment web-app --name web-app-svc --port=3000

and then it would create a simple StaticRoute and connect it:

apiVersion: gateway.kusk.io/v1alpha1
kind: StaticRoute
metadata:
  name: web-app-static-route
spec:
  fleet:
    name: kusk-gateway-envoy-fleet
    namespace: kusk-system
  upstream:
    service:
      name: web-app-svc
      namespace: default
      port: 3000

Alternatively, if that's complicated, we could just create the StaticRoute given a service name:

kusk deploy pages --service web-app 

Which would create the StaticRoute under-the-hood.

@olensmar
Copy link
Member

olensmar commented Dec 7, 2022

although this is cool - aren't there other tools out there that already to this? could/should we start with "containerised APIs" instead? - i.e.

kusk deploy api --container swaggerapi/peststorev3 --definition <external-url-or-path-exposed-by-container-to-openapi>

?

@aabedraba
Copy link
Author

@olensmar definitely would be better to start with APIs.

you mention other tools solving this for frontend, which ones have you seen so far the solve this? I’m not aware of any.

@jasmingacic
Copy link
Contributor

Actually why not both. Users can pick what they want to deploy either an API or a FE app.

kusk create page --service web-app --image myrepo/myimage:latest --port 80
kusk create api --service api-svc --image myrepo/myapi:latest 

We can make only image parameter required and we autogenerate service name

This would mean from 0 to fully working FE/API in 5 minutes

@aabedraba
Copy link
Author

This would mean from 0 to fully working FE/API in 5 minutes

Actually, less than a minute :P

@olensmar
Copy link
Member

olensmar commented Dec 7, 2022

For create api I guess we would require a path/url to the openapi definition?

@jasmingacic
Copy link
Contributor

Yes that is correct I forgot to add it

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

No branches or pull requests

3 participants