deployments.yaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. apiVersion: v1
  2. items:
  3. - apiVersion: v1
  4. kind: Service
  5. metadata:
  6. annotations:
  7. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  8. kompose.version: 1.26.0 (40646f47)
  9. creationTimestamp: null
  10. labels:
  11. io.kompose.service: backend
  12. name: backend
  13. spec:
  14. ports:
  15. - name: "8080"
  16. port: 8080
  17. targetPort: 8080
  18. selector:
  19. io.kompose.service: backend
  20. status:
  21. loadBalancer: {}
  22. - apiVersion: v1
  23. kind: Service
  24. metadata:
  25. annotations:
  26. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  27. kompose.version: 1.26.0 (40646f47)
  28. creationTimestamp: null
  29. labels:
  30. io.kompose.service: client
  31. name: client
  32. spec:
  33. ports:
  34. - name: "8081"
  35. port: 8081
  36. targetPort: 8081
  37. selector:
  38. io.kompose.service: client
  39. status:
  40. loadBalancer: {}
  41. - apiVersion: v1
  42. kind: Service
  43. metadata:
  44. annotations:
  45. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  46. kompose.version: 1.26.0 (40646f47)
  47. creationTimestamp: null
  48. labels:
  49. io.kompose.service: db
  50. name: db
  51. spec:
  52. ports:
  53. - name: "3306"
  54. port: 3306
  55. targetPort: 3306
  56. selector:
  57. io.kompose.service: db
  58. status:
  59. loadBalancer: {}
  60. - apiVersion: apps/v1
  61. kind: Deployment
  62. metadata:
  63. annotations:
  64. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  65. kompose.version: 1.26.0 (40646f47)
  66. creationTimestamp: null
  67. labels:
  68. io.kompose.service: backend
  69. name: backend
  70. spec:
  71. replicas: 1
  72. selector:
  73. matchLabels:
  74. io.kompose.service: backend
  75. strategy: {}
  76. template:
  77. metadata:
  78. annotations:
  79. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  80. kompose.version: 1.26.0 (40646f47)
  81. creationTimestamp: null
  82. labels:
  83. io.kompose.network/test-network: "true"
  84. io.kompose.service: backend
  85. spec:
  86. containers:
  87. - env:
  88. - name: TZ
  89. value: Asia/Shanghai
  90. image: backend
  91. name: backend
  92. ports:
  93. - containerPort: 8080
  94. resources: {}
  95. restartPolicy: Always
  96. status: {}
  97. - apiVersion: networking.k8s.io/v1
  98. kind: NetworkPolicy
  99. metadata:
  100. creationTimestamp: null
  101. name: test-network
  102. spec:
  103. ingress:
  104. - from:
  105. - podSelector:
  106. matchLabels:
  107. io.kompose.network/test-network: "true"
  108. podSelector:
  109. matchLabels:
  110. io.kompose.network/test-network: "true"
  111. - apiVersion: apps/v1
  112. kind: Deployment
  113. metadata:
  114. annotations:
  115. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  116. kompose.version: 1.26.0 (40646f47)
  117. creationTimestamp: null
  118. labels:
  119. io.kompose.service: client
  120. name: client
  121. spec:
  122. replicas: 1
  123. selector:
  124. matchLabels:
  125. io.kompose.service: client
  126. strategy: {}
  127. template:
  128. metadata:
  129. annotations:
  130. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  131. kompose.version: 1.26.0 (40646f47)
  132. creationTimestamp: null
  133. labels:
  134. io.kompose.service: client
  135. spec:
  136. containers:
  137. - image: client
  138. name: client
  139. ports:
  140. - containerPort: 8081
  141. resources: {}
  142. restartPolicy: Always
  143. status: {}
  144. - apiVersion: apps/v1
  145. kind: Deployment
  146. metadata:
  147. annotations:
  148. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  149. kompose.version: 1.26.0 (40646f47)
  150. creationTimestamp: null
  151. labels:
  152. io.kompose.service: db
  153. name: db
  154. spec:
  155. replicas: 1
  156. selector:
  157. matchLabels:
  158. io.kompose.service: db
  159. strategy:
  160. type: Recreate
  161. template:
  162. metadata:
  163. annotations:
  164. kompose.cmd: D:\program\k8s\kompose.exe convert -o deployments.yaml
  165. kompose.version: 1.26.0 (40646f47)
  166. creationTimestamp: null
  167. labels:
  168. io.kompose.network/test-network: "true"
  169. io.kompose.service: db
  170. spec:
  171. containers:
  172. - args:
  173. - --character-set-server=utf8mb4
  174. - --collation-server=utf8mb4_unicode_ci
  175. env:
  176. - name: MYSQL_ROOT_PASSWORD
  177. value: root
  178. - name: TZ
  179. value: Asia/Shanghai
  180. image: mysql:5.7
  181. name: db
  182. ports:
  183. - containerPort: 3306
  184. resources: {}
  185. volumeMounts:
  186. - mountPath: /var/lib/mysql
  187. name: db-claim0
  188. restartPolicy: Always
  189. volumes:
  190. - name: db-claim0
  191. persistentVolumeClaim:
  192. claimName: db-claim0
  193. status: {}
  194. - apiVersion: v1
  195. kind: PersistentVolumeClaim
  196. metadata:
  197. creationTimestamp: null
  198. labels:
  199. io.kompose.service: db-claim0
  200. name: db-claim0
  201. spec:
  202. accessModes:
  203. - ReadWriteOnce
  204. resources:
  205. requests:
  206. storage: 100Mi
  207. status: {}
  208. kind: List
  209. metadata: {}