Hi,
I have a .NET core WEB API that uses PostgresSQL for persisting the data. Both are in container. I use docker compose to deploy them. Now I want to use docker with Kubernetes and deploy them as ServerLess in openFaaS. I need some guidance step by step do the same. I'm old to docker but new to both Kubernetes as well as openFaas
docker version (e.g. Docker 17.0.05 ):17.09-ce-win33Are you using Docker Swarm or Kubernetes (FaaS-netes)?: Kubernetes
Operating System and version (e.g. Linux, Windows, MacOS): Windows
@VenkateshSrini I don't think you can and should host a PostgresSQL on the FaasPlattform. However, you can deploy the database on its own. And instead, do the persisting call from the .NET application. If you have some code to share I might give more concrete advice on how to approach.
@VenkateshSrini you should deploy Postgres within your cluster in a namespace reachable by your OpenFaaS function. Depending on the latency to open a DB connection you may want to create a small micro service to manage a connection pool (long-running service) and then call into it via the functions.
@BurtonR is also looking at doing this with T-SQL and MSSQL.
@Templum Hi Simon, thanks for offering a suggestion 馃憤
@alexellis,
This is where the problem comes. When I deploy that as a separate docker in Kubernetes and run OpenFass in a separate POD how will I make them communicate is the challenge. That is where we are asking for the step by Step by article of how this can be achieved. Could you please help me on the same.
@VenkateshSrini
Start by installing and setting up Helm on your machine/cluster. The instructions for this can be found here. After the setup, you can continue to install PostgresSQL using. [More Enterprise ready approach for installing PostgresSQL can be found [here](http://blog.kubernetes.io/2017/02/postgresql-clusters-kubernetes-statefulsets.html)]
$ helm install stable/postgresql
Now you should be able to execute the following commands and see Postgres.
$ kubectl get pods
$ kubectl get services
$ kubectl get deployments
Within your faas function/service you should be able to access your database using _ignoble-badger-postgresql.default_ (Schema deploymentname.namespace)
Hey mine is a windows 10 machine. Don't I have an exe or msi
@VenkateshSrini So with which of the required tools do you struggle?
kubectl => using choco package manager
helm => exe can be obtained from the official website
We have provided an answer, so closing the issue. Please feel free to keep commenting.