apiVersion: apps/v1 kind: Deployment metadata: name: rest-api labels: app: rest-api spec: replicas: 1 selector: matchLabels: app: rest-api template: metadata: labels: app: rest-api spec: volumes: - name: secret-volume secret: secretName: my-secret containers: - name: rest-api image: localhost:5000/rest-api:latest ports: - containerPort: 8080 volumeMounts: - name: secret-volume readOnly: true mountPath: "/etc/secret-volume" --- kind: Service apiVersion: v1 metadata: name: rest-api spec: selector: app: rest-api ports: - protocol: TCP port: 80 targetPort: 8080 --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: rest-api annotations: nginx.ingress.kubernetes.io/proxy-connect-timeout: 60s # nginx.ingress.kubernetes.io/ssl-passthrough: "true" # labels: # app: rest-api # app.kubernetes.io/instance: fabricpeer # app.kubernetes.io/managed-by: fabric-operator # app.kubernetes.io/name: fabric # creator: fabric # orgname: Org1MSP spec: ingressClassName: nginx rules: - host: restapi.localho.st http: paths: - backend: service: name: rest-api port: number: 80 path: / pathType: ImplementationSpecific tls: - hosts: - restapi.localho.st