nginx-app.yaml 734 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: nginxsvc
  5. labels:
  6. app: nginx
  7. spec:
  8. type: NodePort
  9. ports:
  10. - port: 80
  11. protocol: TCP
  12. name: http
  13. - port: 443
  14. protocol: TCP
  15. name: https
  16. selector:
  17. app: nginx
  18. ---
  19. apiVersion: v1
  20. kind: ReplicationController
  21. metadata:
  22. name: my-nginx
  23. spec:
  24. replicas: 1
  25. template:
  26. metadata:
  27. labels:
  28. app: nginx
  29. spec:
  30. volumes:
  31. - name: secret-volume
  32. secret:
  33. secretName: nginxsecret
  34. containers:
  35. - name: nginxhttps
  36. image: bprashanth/nginxhttps:1.0
  37. ports:
  38. - containerPort: 443
  39. - containerPort: 80
  40. volumeMounts:
  41. - mountPath: /etc/nginx/ssl
  42. name: secret-volume