Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. apiVersion: v1
  2. items:
  3. - apiVersion: extensions/v1beta1
  4. kind: Ingress
  5. metadata:
  6. name: example-ingress
  7. labels:
  8. app: example
  9. annotations:
  10. spec:
  11. rules:
  12. - host: app.example.com
  13. http:
  14. paths:
  15. - path: /
  16. backend:
  17. serviceName: example-svc
  18. servicePort: 80
  19. tls:
  20. - apiVersion: v1
  21. kind: Service
  22. metadata:
  23. name: example-svc
  24. labels:
  25. app: example
  26. spec:
  27. ports:
  28. - name: http
  29. port: 9000
  30. targetPort: http
  31. selector:
  32. app: example
  33. status:
  34. loadBalancer: {}
  35. - apiVersion: v1
  36. kind: Service
  37. metadata:
  38. name: nginx-svc
  39. labels:
  40. app: nginx
  41. spec:
  42. ports:
  43. - name: http
  44. port: 80
  45. targetPort: http
  46. selector:
  47. app: nginx
  48. type: NodePort
  49. status:
  50. loadBalancer: {}
  51. - apiVersion: v1
  52. kind: ConfigMap
  53. metadata:
  54. name: example-configmap
  55. labels:
  56. app: example
  57. data:
  58. config.ini: |-
  59. - apiVersion: v1
  60. kind: PersistentVolumeClaim
  61. metadata:
  62. name: example-data-pvc
  63. annotations: {}
  64. labels:
  65. app: example
  66. spec:
  67. accessModes:
  68. - ReadWriteOnce
  69. resources:
  70. requests:
  71. storage: 100Mi
  72. status: {}
  73. - apiVersion: extensions/v1beta1
  74. kind: Deployment
  75. metadata:
  76. name: example-deployment
  77. labels:
  78. app: example
  79. spec:
  80. replicas: 1
  81. strategy:
  82. type: Recreate
  83. template:
  84. metadata:
  85. labels:
  86. app: example
  87. spec:
  88. containers:
  89. - name: example
  90. image: bitnami/php-example:0.0.1
  91. ports:
  92. - containerPort: 9000
  93. name: http
  94. volumeMounts:
  95. - mountPath: /app/config.ini
  96. name: example-config
  97. subPath: config.ini
  98. - mountPath: /app/data
  99. name: example-data
  100. readinessProbe:
  101. tcpSocket:
  102. port: http
  103. initialDelaySeconds: 10
  104. timeoutSeconds: 5
  105. restartPolicy: Always
  106. volumes:
  107. - name: example-config
  108. configMap:
  109. name: example-configmap
  110. - name: example-data
  111. persistentVolumeClaim:
  112. claimName: example-data-pvc
  113. status: {}
  114. - apiVersion: extensions/v1beta1
  115. kind: Deployment
  116. metadata:
  117. name: nginx-deployment
  118. labels:
  119. app: nginx
  120. spec:
  121. replicas: 1
  122. strategy:
  123. type: Recreate
  124. template:
  125. metadata:
  126. labels:
  127. app: nginx
  128. spec:
  129. containers:
  130. - name: nginx
  131. image: bitnami/nginx:latest
  132. ports:
  133. - containerPort: 8080
  134. name: http
  135. livenessProbe:
  136. httpGet:
  137. path: /
  138. port: http
  139. initialDelaySeconds: 30
  140. timeoutSeconds: 5
  141. readinessProbe:
  142. httpGet:
  143. path: /
  144. port: http
  145. initialDelaySeconds: 5
  146. timeoutSeconds: 1
  147. volumeMounts:
  148. - name: nginx-vhost
  149. mountPath: /bitnami/nginx/conf/vhosts
  150. volumes:
  151. - name: nginx-vhost
  152. configMap:
  153. name: nginx-configmap
  154. restartPolicy: Always
  155. status: {}
  156. - apiVersion: v1
  157. kind: ConfigMap
  158. metadata:
  159. name: nginx-configmap
  160. labels:
  161. app: nginx
  162. data:
  163. myapp.conf: |-
  164. server {
  165. listen 0.0.0.0:8080;
  166. server_name myapp.com;
  167.  
  168. root /app;
  169.  
  170. location / {
  171. try_files $uri $uri/index.php;
  172. }
  173.  
  174. location ~ \.php$ {
  175. # fastcgi_pass example-svc:9000;
  176. fastcgi_pass example-svc:9000;
  177. fastcgi_index index.php;
  178. include fastcgi.conf;
  179. }
  180. }
  181. kind: List
  182. metadata: {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement