k8s deployment yaml 参数模版(注意黑体质)

#secrets与configmap 默认readonly

 

{
  "kind": "Deployment",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "search-online",
    "namespace": "zzyy",
    "selfLink": "/apis/extensions/v1beta1/namespaces/zzyy/deployments/search-online",
    "uid": "ccfc1a4c-51f4-11e9-80a7-080027283e9e",
    "resourceVersion": "1080",
    "generation": 1,
    "creationTimestamp": "2019-03-29T07:32:26Z",
    "labels": {
      "nlp": "zzyy.Deployment.search_online"
    },
    "annotations": {
      "deployment.kubernetes.io/revision": "1"
    }
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "nlp": "zzyy.Deployment.search_online"
      }
    },
    "template": {
      "metadata": {
        "creationTimestamp": null,
        "labels": {
          "nlp": "zzyy.Deployment.search_online"
        }
      },
      "spec": {
        "volumes": [
          {
            "name": "search-online-log",
            "hostPath": {
              "path": "/data/duser/chengdushisuo/test/data/text_simi_es/logs/search_online",
              "type": ""
            }
          },
          {
            "name": "search-online-configs",
            "configMap": {
              "name": "search-online-configs",
              "defaultMode": 420#secrets与configmap 默认readonly
            }
          }
        ],
        "containers": [
          {
            "name": "search-online",
            "image": "dockerhub.datagrand.com/chengdushisuo/search_online:lastest",
            "ports": [
              {
                "containerPort": 9890,
                "protocol": "TCP"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "search-online-log",
                "mountPath": "/root/search_online/logs"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {
          "seLinuxOptions": {}
        },
        "imagePullSecrets": [
          {
            "name": "mysecret"
          }
        ],
        "schedulerName": "default-scheduler"
      }
    },
    "strategy": {
      "type": "RollingUpdate",
      "rollingUpdate": {
        "maxUnavailable": "25%",
        "maxSurge": "25%"
      }
    },
    "revisionHistoryLimit": 2,
    "progressDeadlineSeconds": 600
  },
  "status": {
    "observedGeneration": 1,
    "replicas": 1,
    "updatedReplicas": 1,
    "readyReplicas": 1,
    "availableReplicas": 1,
    "conditions": [
      {
        "type": "Available",
        "status": "True",
        "lastUpdateTime": "2019-03-29T07:33:21Z",
        "lastTransitionTime": "2019-03-29T07:33:21Z",
        "reason": "MinimumReplicasAvailable",
        "message": "Deployment has minimum availability."
      },
      {
        "type": "Progressing",
        "status": "True",
        "lastUpdateTime": "2019-03-29T07:33:21Z",
        "lastTransitionTime": "2019-03-29T07:32:26Z",
        "reason": "NewReplicaSetAvailable",
        "message": "ReplicaSet \"search-online-5486f9f787\" has successfully progressed."
      }
    ]
  }
}

你可能感兴趣的:(k8s deployment yaml 参数模版(注意黑体质))