K8s-deployment.yaml:修订间差异

来自三线的随记
(创建页面,内容为“example kind: Deployment apiVersion: apps/v1 metadata: name: ubuntu-16-04 namespace: default labels: dce.daocloud.io/app: ubuntu-1604 spec: repl…”)
 
无编辑摘要
 
第1行: 第1行:
example
example
常用示例
  kind: Deployment
  kind: Deployment
  apiVersion: apps/v1
  apiVersion: apps/v1

2020年6月10日 (三) 16:29的最新版本

example

常用示例

kind: Deployment
apiVersion: apps/v1
metadata:
  name: ubuntu-16-04
  namespace: default
  labels:
    dce.daocloud.io/app: ubuntu-1604
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: ubuntu-16-04
  template:
    metadata:
      creationTimestamp: null
      labels:
        dce.daocloud.io/app: ubuntu-1604
        k8s-app: ubuntu-16-04
    spec:
      containers:
        - name: ubuntu
          image: 'daocloud.io/library/ubuntu:16.04'
          resources:
            limits:
              cpu: '1'
              memory: 1Gi
          imagePullPolicy: IfNotPresent
          tty: true
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/hostname
                    operator: In
                    values:
                      - node-1
      tolerations:
        - operator: Exists
          effect: NoSchedule
  strategy:
    type: Recreate