Is it possible to deploy any Docker Images to fermyon using spin cli? #2535
-
Can Spin deploy any Docker Images to Fermyon Cloud? e.g. you have a GRPC server built with rust using Rust Tonic i was wondering if we can use fermyon cloud to deploy as such or we are only limited to what is build with spin build and spin deloy? hope someone can answer my question thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Spin cannot deploy Docker images, and Fermyon Cloud cannot run Docker images. Spin applications are WebAssembly, not containers, and Fermyon Cloud runs only WebAssmbly. You can use SpinKube (https://www.spinkube.dev/) to run Spin applications and Docker images alongside each other in a Kubernetes environment. But they remain separate things. |
Beta Was this translation helpful? Give feedback.
-
Do you have any example using custom docker images ? |
Beta Was this translation helpful? Give feedback.
-
@sohanmaheshwar @jpflueger Can you help @codeitlikemiley please? I'm not very au fait with the Docker side of things, sorry |
Beta Was this translation helpful? Give feedback.
-
spinkube/documentation#173 i think im stuck as well as other people on pushing images Im also concern now about how, we can use spin kube on production e.g. AWS EKS or Google GKE .... frankly i never saw any tutorial about that , would really love that content as well for now i think i will use the normal spin deploy, but i dont know if that is already auto-scaling? Hope someone can shed some light into production with spin kube :) thanks for this great Open source project , I will be building my next project with this |
Beta Was this translation helpful? Give feedback.
-
Hey @codeitlikemiley Glad to see you got both SpinKube and your Spin App running on Kubernetes. Kubernetes offers different approaches to route requests from outside of the cluster to your Spin App:
Using an Ingress Controller is definitely the preferred way to go, because it allows you to define different Usually cloud-vendors (such as Azure, AWS, GCP) provide opinionated, managed Ingress controllers, that you can use in combination with their managed Kubernetes offering. (e.g, Azure Application Gateway Ingress Controller (AGIC) in the case of Azure AKS). IMO, this website provides a good introduction about AGIC in the case of Azure -> https://azure.github.io/application-gateway-kubernetes-ingress/ on top that there is plenty of documentation on learn.microsoft.com e.g, https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-existing?toc=%2Fazure%2Faks%2Ftoc.json&bc=%2Fazure%2Faks%2Fbreadcrumb%2Ftoc.json Alternatively you can use one of the popular Ingress controllers from Kubernetes ecosystem (such as NGINX Ingress, Traefik, or others) Independant from the Ingress Controller you'll end up using, you create an A bit more contextWhen you deploy a Spin App to Kubernetes (
You can control different parts of those primitives by using corresponding flags when creating the Kubernetes Deployment manifest with Alternatively, you can store the manifest to a file ( Ingress ConfigurationKnowing about the Kubernetes Service created for your Spin App, you should be able to create a corresponding For example, see these Deployment Manifests shown in the Microsoft Documentation linked earlier. Although they deploy a regular container to AKS, they're also using an Service with an apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: spinapp
annotations:
kubernetes.io/ingress.class: azure/application-gateway
spec:
ingressClassName: azure-application-gateway
rules:
- http:
paths:
- path: /
backend:
service:
name: my-spinapp
port:
number: 80
pathType: Exact You may want to have a look at different |
Beta Was this translation helpful? Give feedback.
Hey @codeitlikemiley
I do not have a Docker custom image repo with SpinKube right now. But we do have docs on running SpinKube on Azure Kubernetes Service (AKS) - https://www.spinkube.dev/docs/spin-operator/tutorials/deploy-on-azure-kubernetes-service/
One of our community members had written about it too:
https://dev.to/thangchung/how-to-build-and-run-spinapp-on-azure-kubernetes-services-aks-with-spinkube-in-3-steps-1212
In fact we did a livestream about SpinKube and AKS with some MS folks recently - https://www.youtube.com/watch?v=luPYhqwrjyY
This pattern is close to enterprise-grade and the same pattern can be used for AWS EKS and GKE as well. We hope to have a step-by-step for that ve…