Update high-availability.md (#8783)
Fix indentation damaged etcd YAML manifest
This commit is contained in:
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
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
labels:
|
||||
component: etcd
|
||||
tier: control-plane
|
||||
name: <podname>
|
||||
namespace: kube-system
|
||||
name: <podname>
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- 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
|
||||
containers:
|
||||
- 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
|
||||
image: k8s.gcr.io/etcd-amd64:3.1.10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 2379
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: etcd
|
||||
env:
|
||||
- name: PUBLIC_IP
|
||||
valueFrom:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: PRIVATE_IP
|
||||
valueFrom:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
fieldPath: status.podIP
|
||||
- name: PEER_NAME
|
||||
valueFrom:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
fieldPath: metadata.name
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/etcd
|
||||
name: etcd
|
||||
name: etcd
|
||||
- mountPath: /certs
|
||||
name: certs
|
||||
name: certs
|
||||
hostNetwork: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/lib/etcd
|
||||
type: DirectoryOrCreate
|
||||
name: etcd
|
||||
name: etcd
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/pki/etcd
|
||||
name: certs
|
||||
name: certs
|
||||
EOF
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user