apiVersion: v1
kind: Pod
metadata:
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ""
  labels:
    component: etcd
    tier: control-plane
  name: etcd
  namespace: kube-system
spec:
  hostNetwork: true
  priorityClassName: system-cluster-critical
  containers:
  - name: etcd
    image: quay.io/coreos/etcd:v3.3.8
    imagePullPolicy: IfNotPresent
    command:
    - etcd
    - --config-file=/etc/etcd/config.yml
    livenessProbe:
      tcpSocket:
        port: 2379
      failureThreshold: 8
      initialDelaySeconds: 15
      timeoutSeconds: 15
    volumeMounts:
    - mountPath: /etc/etcd/ssl
      name: etcd-certs
    - mountPath: /etc/etcd/config.yml
      name: etcd-conf
    - mountPath: /var/lib/etcd
      name: data-dir
  volumes:
  - hostPath:
      path: /etc/etcd/ssl
      type: DirectoryOrCreate
    name: etcd-certs
  - hostPath:
      path: /etc/etcd/config.yml
    name: etcd-conf
  - hostPath:
      path: /var/lib/etcd
      type: DirectoryOrCreate
    name: data-dir
