diff --git a/docker-server-cli-k8s/k8s_01/deployment.yaml b/docker-server-cli-k8s/k8s_01/deployment.yaml new file mode 100644 index 0000000..0a4cebc --- /dev/null +++ b/docker-server-cli-k8s/k8s_01/deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: server-cli +spec: + replicas: 1 + selector: + matchLabels: + app: server-cli + template: + metadata: + labels: + app: server-cli + spec: + containers: + - name: server-cli + image: wppconnect/server-cli:latest + command: ["/bin/sh", "-c"] + args: + ["wppserver --secretKey My53cr3tKY --port 21465 --startAllSession"] + volumeMounts: + - mountPath: /home/tokens + name: server-cli-volume + ports: + - containerPort: 21465 + + resources: + requests: + cpu: "0.5" + memory: "500Mi" + limits: + cpu: "0.5" + memory: "1Gi" + + startupProbe: + httpGet: + path: /healthz + port: 21465 + periodSeconds: 3 + failureThreshold: 60 + + readinessProbe: + httpGet: + path: /healthz + port: 21465 + periodSeconds: 3 + failureThreshold: 1 + + livenessProbe: + httpGet: + path: /healthz + port: 21465 + periodSeconds: 5 + failureThreshold: 1 + timeoutSeconds: 1 + successThreshold: 1 + + volumes: + - name: server-cli-volume + persistentVolumeClaim: + claimName: server-cli-volume diff --git a/docker-server-cli-k8s/k8s_01/pvc.yaml b/docker-server-cli-k8s/k8s_01/pvc.yaml new file mode 100644 index 0000000..a4918b4 --- /dev/null +++ b/docker-server-cli-k8s/k8s_01/pvc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: server-cli-volume +spec: + resources: + requests: + storage: 1Gi + accessModes: + - ReadWriteOnce diff --git a/docker-server-cli-k8s/k8s_01/service.yaml b/docker-server-cli-k8s/k8s_01/service.yaml new file mode 100644 index 0000000..8536ba1 --- /dev/null +++ b/docker-server-cli-k8s/k8s_01/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: wppconnect +spec: + selector: + app: server-cli + ports: + - port: 8080 + targetPort: 21465 + type: LoadBalancer