创建Pod编排
最近更新时间: 2019-11-02 12:22:30
POST /v2/podstack/{projectName}
请求body
{
"stackInstanceName": "pod666",
"content": "containers:\n- image: docker.oa.com:8080/public/mysql:latest\n name: mysql\n env:\n - name: POD_NAMESPACE\n valueFrom:\n fieldRef:\n fieldPath: metadata.namespace\n - name: MYSQL_ROOT_PASSWORD\n value: hhh\n ports:\n - containerPort: 8080\n name: admin-port\n - containerPort: 3306\n name: db-port\n resources:\n requests:\n cpu: 100m\n memory: 128Mi\n volumeMounts:\n - mountPath: /var/lib/mysql\n name: rethinkdb-storage\n- image: docker.oa.com:8080/public/2048:latest\n name: 2048app\n env:\n - name: POD_NAME\n value: 2048app\n ports:\n - containerPort: 80\n name: web\nvolumes:\n- name: rethinkdb-storage\n emptyDir: {}\nreplicas: 3\nannotation:\n- containerName: mysql\n logPath: /data1\n dataPath: /data2\n- containerName: 2048app\n logPath: /var/log",
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
"targetCPUUtilization": 50
}