编写OpenShift的yaml以定义容器
一、创建secret
在OpenShift左侧Resources->Secret->Create Secret里选择Image Secret后创建。
二、编写yaml
1. ConfigMap
apiVersion: V1
kind: ConfigMap
metadata:
name: app-config-map
data:
application.properties: |
spring.profiles.active=dev
server.xml: >-
<?xml version='1.0' encoding='utf-8'?>
2. Deployment
apiVersion: V1
kind: Deployment
metadata:
name: app
spec:
#定义副本