apiVersion: v1 kind: Service metadata: name: librospy spec: type: NodePort ports: - name: http port: 5000 nodePort: 30341 targetPort: librospy selector: app: librospy --- apiVersion: apps/v1 kind: Deployment metadata: name: librospy labels: app: librospy spec: replicas: 1 selector: matchLabels: app: librospy strategy: type: Recreate template: metadata: labels: app: librospy spec: containers: - args: - gunicorn - --bind - 0.0.0.0:5000 - libros:create_app() name: librospy image: creylopez/libros:$IMG_VERSION env: - name: SALUDO_DEMO value: "Hola, mundo" ports: - containerPort: 5000 name: librospy resources: {} volumeMounts: - mountPath: /libros/instance name: librospy-instance - mountPath: /libros/migrations name: librospy-migrations restartPolicy: Always volumes: - name: librospy-instance persistentVolumeClaim: claimName: librospy-instance - name: librospy-migrations persistentVolumeClaim: claimName: librospy-migrations status: {}