Skip to content

Instantly share code, notes, and snippets.

@joejulian
Created July 2, 2018 23:14
Show Gist options
  • Save joejulian/b2164ba1a42d85d5a80b9abbc7c412b4 to your computer and use it in GitHub Desktop.
Save joejulian/b2164ba1a42d85d5a80b9abbc7c412b4 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: etcd
tier: control-plane
name: etcd
namespace: kube-system
spec:
containers:
- command:
- etcd
- --name=$(ETCD_NAME)
- --peer-client-cert-auth
- --cert-file=/etc/kubernetes/pki/$(ETCD_NAME).etcd-server.pem
- --key-file=/etc/kubernetes/pki/$(ETCD_NAME).etcd-server-key.pem
- --peer-cert-file=/etc/kubernetes/pki/$(ETCD_NAME).etcd-peer.pem
- --peer-key-file=/etc/kubernetes/pki/$(ETCD_NAME).etcd-peer-key.pem
- --trusted-ca-file=/etc/kubernetes/pki/ca.pem
- --peer-trusted-ca-file=/etc/kubernetes/pki/ca.pem
- --initial-advertise-peer-urls=https://$(IP_ADDR):2380
- --listen-peer-urls=https://$(IP_ADDR):2380
- --listen-client-urls=http://127.0.0.1:2379,https://$(IP_ADDR):2379
- --advertise-client-urls=https://$(IP_ADDR):2379
- --initial-cluster=kubecon1=https://192.168.2.21:2380,kubecon2=https://192.168.2.22:2380,kubecon3=https://192.168.2.23:2380
- --data-dir=/var/lib/etcd
- --snapshot-count=2500
- --heartbeat-interval=200
- --election-timeout=5000
env:
- name: IP_ADDR
value: "127.0.0.1"
- name: ETCD_NAME
value: "localhost"
- name: ETCD_VERBOSE
value: "1"
- name: ETCD_UNSUPPORTED_ARCH
value: "arm64"
- name: GOMAXPROCS
value: "4"
image: quay.io/coreos/etcd:v3.2.22-arm64
ports:
- containerPort: 2380
hostPort: 2380
name: serverport
- containerPort: 2379
hostPort: 2379
name: clientport
livenessProbe:
failureThreshold: 8
httpGet:
host: 127.0.0.1
path: /health
port: 2379
initialDelaySeconds: 600
timeoutSeconds: 15
name: etcd
resources:
requests:
cpu: 2000m
volumeMounts:
- mountPath: /etc/kubernetes/pki/
name: certs
- mountPath: /var/lib/etcd
name: etcd
- mountPath: /var/lib/kubernetes/
name: k8s
readOnly: true
hostNetwork: true
securityContext:
seLinuxOptions:
type: spc_t
volumes:
- hostPath:
path: /etc/kubernetes/pki
name: certs
- hostPath:
path: /var/lib/etcd
name: etcd
- hostPath:
path: /var/lib/kubernetes
name: k8s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment