操作类 本文介绍操作类常见问题。 在已有的节点创建应用时未重新拉取镜像? 用户需要编辑应用的yaml文件,修改镜像拉取策略字段imagePullPolicy为Always,保证每次创建应用都会拉取镜像,而并不使用节点上已有的镜像,另外当容器镜像的tag不是latest时,用户更新该容器镜像但没有更改镜像的tag,则使用该镜像创建应用时,就不会重新拉取更新后的镜像,需要您在更新镜像的同时更改镜像的版本tag。 ConfigMap配置项要求是什么? 配置项若使用上传文件功能设置配置项,目前支持json和yaml两种格式,且文件大小不得超过2MB。以下列举了json及yaml两种示例: json格式: { "kind": "ConfigMap", "apiVersion": "v1", "metadata": { "name": "paasbrokerapp017", "namespace": "lcqtest", "enable": true }, "data": { "context": "{"applicationComponent":{"properties":{"customspec":{}},"nodename":"paasbroker app","stackid":"0177eae189d3cb8a1f94 c0feb7e91d7b"},"softwareComponents":[{"properties":{"customspec":{}},"nodename":"paas broker","stackid":"0177eae189d3cb8a1f94c0feb7e91d7b"}]}" } } yaml格式: apiVersion: apps/v1beta2 for versions before 1.8.0 use apps/v1beta1 kind: Deployment metadata: name: nginxdeploymentbasic labels: app: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: nodeSelector: env: testteam containers: name: nginx image: nginx:1.7.9