Has anyone had any success deploying Prisma with K...
# orm-help
s
Has anyone had any success deploying Prisma with Kompose? http://kompose.io
j
I've done that. Pointed Kompose to the docker-compose file. It made 5 files. Applied those to k8s and it worked. I don't remember if I had to add a service for postgres or not.
s
Was this the same file as (or similar to) the one shown in the documentation? @Jenkins
j
Let me compile one and I'll have a look. I'm out of my office right now, but I'll send it to you tomorrow morning if you're OK with that?
s
Oh sure, no rush at all. Very much appreciated. 🙂
j
Okay, so I did have to do some tweaks. First off is modifying the prisma-service.yaml to expose a NodePort.
Copy code
...
  selector:
    io.kompose.service: prisma
  type: NodePort
status:
  loadBalancer: {}
...
Second was to create a Service for Postgres. In this service, however, we leave out the the type so it defaults to ClusterIP.
Copy code
---
apiVersion: v1
kind: Service
metadata:
  name: postgres
spec:
  ports:
  - name: "5432"
    port: 5432
    targetPort: 5432
  selector:
    io.kompose.service: postgres
status:
  loadBalancer: {}
With this I was able to deploy it to Kubernetes without any more issues.
There's probably some way to "write the compose in such a way" that it works directly. Would be kind of nice. If you figure out a way for that to work - please reply to this thread again 🦜
s
You rock! I was also looking for a way to write the compose file to accomplish the changes you made. I’ll let you know.
❤️ 1