42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
|
apiVersion: "apps/v1beta1"
|
||
|
kind: StatefulSet
|
||
|
metadata:
|
||
|
name: calico-etcd
|
||
|
namespace: kube-system
|
||
|
labels:
|
||
|
kubernetes.io/cluster-service: "true"
|
||
|
k8s-app: calico-etcd
|
||
|
spec:
|
||
|
serviceName: calico-etcd
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
kubernetes.io/cluster-service: "true"
|
||
|
k8s-app: calico-etcd
|
||
|
spec:
|
||
|
hostNetwork: true
|
||
|
containers:
|
||
|
- name: calico-etcd
|
||
|
image: gcr.io/google_containers/etcd:2.2.1
|
||
|
env:
|
||
|
- name: CALICO_ETCD_IP
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: status.podIP
|
||
|
command: ["/bin/sh","-c"]
|
||
|
args: ["/usr/local/bin/etcd --name=calico --data-dir=/var/etcd/calico-data --advertise-client-urls=http://$CALICO_ETCD_IP:6666 --listen-client-urls=http://0.0.0.0:6666 --listen-peer-urls=http://0.0.0.0:6667"]
|
||
|
volumeMounts:
|
||
|
- name: var-etcd
|
||
|
mountPath: /var/etcd
|
||
|
volumeClaimTemplates:
|
||
|
- metadata:
|
||
|
name: var-etcd
|
||
|
annotations:
|
||
|
volume.alpha.kubernetes.io/storage-class: anything
|
||
|
spec:
|
||
|
accessModes: [ "ReadWriteOnce" ]
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 1Gi
|