Skip to content

Instantly share code, notes, and snippets.

@mauilion
Last active November 8, 2021 17:44
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mauilion/2bab4b00eb7a0ab4fca7023ae251e8ee to your computer and use it in GitHub Desktop.
Save mauilion/2bab4b00eb7a0ab4fca7023ae251e8ee to your computer and use it in GitHub Desktop.
etcdclient static pod with all the bits configured.
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: etcdclient
tier: debug
name: etcdclient
namespace: kube-system
spec:
containers:
- command:
- sleep
- 9999d
image: k8s.gcr.io/etcd:3.3.10
imagePullPolicy: IfNotPresent
name: etcdclient
resources: {}
volumeMounts:
- mountPath: /etc/kubernetes/pki/etcd
name: etcd-certs
readOnly: true
- mountPath: /var/lib/etcd
name: etcd-data
readOnly: false
env:
- name: ETCDCTL_API
value: "3"
- name: ETCDCTL_CACERT
value: /etc/kubernetes/pki/etcd/ca.crt
- name: ETCDCTL_CERT
value: /etc/kubernetes/pki/etcd/healthcheck-client.crt
- name: ETCDCTL_KEY
value: /etc/kubernetes/pki/etcd/healthcheck-client.key
- name: ETCDCTL_ENDPOINTS
value: "https://127.0.0.1:2379"
- name: ETCDCTL_CLUSTER
value: "true"
hostNetwork: true
volumes:
- hostPath:
path: /etc/kubernetes/pki/etcd
type: DirectoryOrCreate
name: etcd-certs
- hostPath:
path: /var/lib/etcd
type: DirectoryOrCreate
name: etcd-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment