Need help to migrate from pm2 to Docker / Kubernetes

I see the question is quite old, but I’ve not seen a reply. If still looking for a reply, what I did is to have my Strapi project folder stored in a private git repo. I added the following dockerfile and build my custom image specific for my project and deployed it using an helm chart with this deployment definition.

dockerfile:
FROM node:14 as builderimage
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY . .
COPY .env.example .env
RUN yarn install
RUN yarn build && yarn cache clean

FROM node:14-slim as build
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY --from=builderimage /usr/src/app .
EXPOSE 80
CMD [ "yarn", "start" ]

Deployment manifest (in helm chart):
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: site-ingress
namespace: {{ .Values.namespace.name }}
annotations:
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- {{ .Values.app.hostname }}
secretName: backend-secret-tls
rules:
- host: {{ .Values.app.hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ .Values.app.name }}
servicePort: 80

apiVersion: v1
kind: Service
metadata:
name: {{ .Values.app.name }}
namespace: {{ .Values.namespace.name }}
labels:
app: {{ .Values.app.name }}
tier: web
spec:
ports:
- port: 80
selector:
app: {{ .Values.app.name }}
tier: web
type: ClusterIP

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.app.name }}
namespace: {{ .Values.namespace.name }}
labels:
app: {{ .Values.app.name }}
tier: web
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Values.app.name }}
tier: web
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 25%
maxSurge: 1
template:
metadata:
labels:
app: {{ .Values.app.name }}
tier: web
spec:
containers:
- image: {{ .Values.app.image }}:{{ .Values.app.tag }}
name: {{ .Values.app.name }}
env:
- name: DB_HOST
value: {{ .Values.app.db.host }}
- name: DB_NAME
value: {{ .Values.app.db.name }}
- name: DB_SRV
value: “false”
- name: DB_USER
value: {{ .Values.app.db.user }}
- name: DB_PASSWORD
value: {{ .Values.app.db.password }}
- name: CLOUDINARY_NAME
value: {{ .Values.app.cloudinary.name }}
- name: CLOUDINARY_KEY
value: {{ .Values.app.cloudinary.key }}
- name: CLOUDINARY_SECRET
value: {{ .Values.app.cloudinary.secret }}
- name: PORT
value: “{{ .Values.app.port }}”
- name: DB_SSL
value: “false”
readinessProbe:
httpGet:
path: /
port: {{ .Values.app.port }}
httpHeaders:
- name: Host
value: {{ .Values.app.hostname }}
initialDelaySeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 5
periodSeconds: 15
ports:
- containerPort: {{ .Values.app.port }}
name: http

I am using Cloudinary, so I do not need a persistent volume locally mounted to store the content.