apiVersion: v1
kind: Pod
metadata:
  name: etcd-server
  namespace: kube-system
spec:
  hostNetwork: true
  containers:
  - name: etcd-container
    image: quay.io/coreos/etcd:v3.2.7
    command:
    - /usr/local/bin/etcd
    - --name
    - etcd0
    - --initial-advertise-peer-urls
    - http://10.0.0.10:2380
    - --listen-peer-urls
    - http://10.0.0.10:2380
    - --listen-client-urls
    - http://10.0.0.10:4001,http://127.0.0.1:4001
    - --advertise-client-urls
    - http://10.0.0.10:4001
    - --initial-cluster-token
    - etcd-cluster-1
    - --data-dir
    - /var/etcd/data
    - --initial-cluster
    - etcd0=http://10.0.0.10:2380
    - --initial-cluster-state
    - new
    - --auto-tls
    - --peer-auto-tls
    resources:
      requests:
        cpu: 100m
    ports:
    - containerPort: 2380
      hostPort: 2380
      name: serverport
    - containerPort: 4001
      hostPort: 4001
      name: clientport
    volumeMounts:
      - mountPath: /var/etcd
        name: varetcd
      - mountPath: /etc/kubernetes/ssl
        name: srv-kube-ssl
  volumes:
  - hostPath:
      path: /var/etcd/data
    name: varetcd
  - hostPath:
      path: /etc/kubernetes/ssl
    name: srv-kube-ssl
