mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| kind: ReplicationController
 | |
| apiVersion: v1
 | |
| metadata:
 | |
|   name: etcd
 | |
|   creationTimestamp: 
 | |
| spec:
 | |
|   strategy:
 | |
|     type: Recreate
 | |
|     resources: {}
 | |
|   triggers:
 | |
|   - type: ConfigChange
 | |
|   replicas: 3
 | |
|   selector:
 | |
|     name: etcd
 | |
|   template:
 | |
|     metadata:
 | |
|       creationTimestamp: 
 | |
|       labels:
 | |
|         name: etcd
 | |
|     spec:
 | |
|       containers:
 | |
|       - name: member
 | |
|         image: openshift/etcd-20-centos7
 | |
|         ports:
 | |
|         - containerPort: 2379
 | |
|           protocol: TCP
 | |
|         - containerPort: 2380
 | |
|           protocol: TCP
 | |
|         env:
 | |
|           # ETCD_NUM_MEMBERS is the maximum number of members to launch (have to match with # of replicas)
 | |
|         - name: ETCD_NUM_MEMBERS
 | |
|           value: "3"
 | |
|         - name: ETCD_INITIAL_CLUSTER_STATE
 | |
|           value: "new"
 | |
|           # ETCD_INITIAL_CLUSTER_TOKEN is a token etcd uses to generate unique cluster ID and member ID. Conforms to [a-z0-9]{40}
 | |
|         - name: ETCD_INITIAL_CLUSTER_TOKEN
 | |
|           value: INSERT_ETCD_INITIAL_CLUSTER_TOKEN
 | |
|           # ETCD_DISCOVERY_TOKEN is a unique token used by the discovery service. Conforms to etcd-cluster-[a-z0-9]{5}
 | |
|         - name: ETCD_DISCOVERY_TOKEN
 | |
|           value: INSERT_ETCD_DISCOVERY_TOKEN
 | |
|           # ETCD_DISCOVERY_URL connects etcd instances together by storing a list of peer addresses, 
 | |
|           # metadata and the initial size of the cluster under a unique address
 | |
|         - name: ETCD_DISCOVERY_URL
 | |
|           value: "http://etcd-discovery:2379"
 | |
|         - name: ETCDCTL_PEERS
 | |
|           value: "http://etcd:2379"
 | |
|         resources: {}
 | |
|         terminationMessagePath: "/dev/termination-log"
 | |
|         imagePullPolicy: IfNotPresent
 | |
|         capabilities: {}
 | |
|         securityContext:
 | |
|           capabilities: {}
 | |
|           privileged: false
 | |
|       restartPolicy: Always
 | |
|       dnsPolicy: ClusterFirst
 | |
|       serviceAccount: ''
 | |
| status: {}
 |