Update high-availability.md (#8783)

Fix indentation damaged etcd YAML manifest
This commit is contained in:
Loïc Albertin
2018-05-30 06:57:53 +02:00
committed by k8s-ci-robot
parent 4c2e4f825b
commit 4ecc84bbce
@@ -287,51 +287,67 @@ Please select one of the tabs to see installation instructions for the respectiv
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
labels: labels:
component: etcd component: etcd
tier: control-plane tier: control-plane
name: <podname> name: <podname>
namespace: kube-system namespace: kube-system
spec: spec:
containers: containers:
- command: - command:
- etcd --name <name> - --data-dir /var/lib/etcd - --listen-client-urls http://localhost:2379 - --advertise-client-urls http://localhost:2379 - --listen-peer-urls http://localhost:2380 - --initial-advertise-peer-urls http://localhost:2380 - --cert-file=/certs/server.pem - --key-file=/certs/server-key.pem - --client-cert-auth - --trusted-ca-file=/certs/ca.pem - --peer-cert-file=/certs/peer.pem - --peer-key-file=/certs/peer-key.pem - --peer-client-cert-auth - --peer-trusted-ca-file=/certs/ca.pem - --initial-cluster etcd0=https://<etcd0-ip-address>:2380,etcd1=https://<etcd1-ip-address>:2380,etcd2=https://<etcd2-ip-address>:2380 - --initial-cluster-token my-etcd-token - --initial-cluster-state new - etcd --name <name>
- --data-dir /var/lib/etcd
- --listen-client-urls http://localhost:2379
- --advertise-client-urls http://localhost:2379
- --listen-peer-urls http://localhost:2380
- --initial-advertise-peer-urls http://localhost:2380
- --cert-file=/certs/server.pem
- --key-file=/certs/server-key.pem
- --client-cert-auth
- --trusted-ca-file=/certs/ca.pem
- --peer-cert-file=/certs/peer.pem
- --peer-key-file=/certs/peer-key.pem
- --peer-client-cert-auth
- --peer-trusted-ca-file=/certs/ca.pem
- --initial-cluster etcd0=https://<etcd0-ip-address>:2380,etcd1=https://<etcd1-ip-address>:2380,etcd2=https://<etcd2-ip-address>:2380
- --initial-cluster-token my-etcd-token
- --initial-cluster-state new
image: k8s.gcr.io/etcd-amd64:3.1.10 image: k8s.gcr.io/etcd-amd64:3.1.10
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /health path: /health
port: 2379 port: 2379
scheme: HTTP scheme: HTTP
initialDelaySeconds: 15 initialDelaySeconds: 15
timeoutSeconds: 15 timeoutSeconds: 15
name: etcd name: etcd
env: env:
- name: PUBLIC_IP - name: PUBLIC_IP
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: status.hostIP fieldPath: status.hostIP
- name: PRIVATE_IP - name: PRIVATE_IP
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: status.podIP fieldPath: status.podIP
- name: PEER_NAME - name: PEER_NAME
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: metadata.name fieldPath: metadata.name
volumeMounts: volumeMounts:
- mountPath: /var/lib/etcd - mountPath: /var/lib/etcd
name: etcd name: etcd
- mountPath: /certs - mountPath: /certs
name: certs name: certs
hostNetwork: true hostNetwork: true
volumes: volumes:
- hostPath: - hostPath:
path: /var/lib/etcd path: /var/lib/etcd
type: DirectoryOrCreate type: DirectoryOrCreate
name: etcd name: etcd
- hostPath: - hostPath:
path: /etc/kubernetes/pki/etcd path: /etc/kubernetes/pki/etcd
name: certs name: certs
EOF EOF
``` ```