github.com/qsunny/k8s@v0.0.0-20220101153623-e6dca256d5bf/examples-master/staging/openshift-origin/etcd-controller.yaml (about) 1 apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 2 kind: Deployment 3 metadata: 4 name: etcd 5 spec: 6 selector: 7 matchLabels: 8 name: etcd 9 strategy: 10 type: Recreate 11 replicas: 3 12 selector: 13 matchLabels: 14 name: etcd 15 template: 16 metadata: 17 labels: 18 name: etcd 19 spec: 20 containers: 21 - name: member 22 image: openshift/etcd-20-centos7 23 ports: 24 - containerPort: 2379 25 protocol: TCP 26 - containerPort: 2380 27 protocol: TCP 28 env: 29 # ETCD_NUM_MEMBERS is the maximum number of members to launch (have to match with # of replicas) 30 - name: ETCD_NUM_MEMBERS 31 value: "3" 32 - name: ETCD_INITIAL_CLUSTER_STATE 33 value: "new" 34 # ETCD_INITIAL_CLUSTER_TOKEN is a token etcd uses to generate unique cluster ID and member ID. Conforms to [a-z0-9]{40} 35 - name: ETCD_INITIAL_CLUSTER_TOKEN 36 value: INSERT_ETCD_INITIAL_CLUSTER_TOKEN 37 # ETCD_DISCOVERY_TOKEN is a unique token used by the discovery service. Conforms to etcd-cluster-[a-z0-9]{5} 38 - name: ETCD_DISCOVERY_TOKEN 39 value: INSERT_ETCD_DISCOVERY_TOKEN 40 # ETCD_DISCOVERY_URL connects etcd instances together by storing a list of peer addresses, 41 # metadata and the initial size of the cluster under a unique address 42 - name: ETCD_DISCOVERY_URL 43 value: "http://etcd-discovery:2379" 44 - name: ETCDCTL_PEERS 45 value: "http://etcd:2379" 46 resources: {} 47 terminationMessagePath: "/dev/termination-log" 48 imagePullPolicy: IfNotPresent 49 securityContext: 50 capabilities: {} 51 privileged: false 52 restartPolicy: Always 53 dnsPolicy: ClusterFirst 54 serviceAccount: '' 55 status: {}