apiVersion: v1 kind: Service metadata: name: libros spec: type: NodePort ports: - name: http port: 5000 nodePort: 30340 targetPort: libros selector: app: libros --- apiVersion: apps/v1 kind: Deployment metadata: name: libros labels: app: libros spec: replicas: 1 selector: matchLabels: app: libros strategy: type: Recreate template: metadata: labels: app: libros spec: containers: - args: - gunicorn - --bind - 0.0.0.0:5000 - libros:create_app() name: libros image: registry.reymota.es/libros:$IMG_VERSION env: - name: VERSION value: "$IMG_VERSION" - name: ENVIRONMENT value: "Producción" ports: - containerPort: 5000 name: libros resources: {} volumeMounts: - mountPath: /libros/instance name: libros-instance - mountPath: /libros/migrations name: libros-migrations imagePullSecrets: - name: myregistrykey restartPolicy: Always volumes: - name: libros-instance persistentVolumeClaim: claimName: libros-instance - name: libros-migrations persistentVolumeClaim: claimName: libros-migrations status: {}