Skip to content

Latest commit

 

History

History
162 lines (146 loc) · 14 KB

EXTERNAL_ETCD.md

File metadata and controls

162 lines (146 loc) · 14 KB

External ETCD instance

By default an instance of etcd is deployed as a part of contiv-vpp in its yaml file. However, you can also point contiv to use a custom, in this tutorial called external, etcd instance. The aim of this document is to describe required steps to achieve this.

Deploying etcd instance

Your custom etcd instance can be deployed at any location accessible from all k8s nodes. For the sake of simplicity in this tutorial, the etcd will be deployed in the k8s cluster

apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
  name: my-etcd
  namespace: kube-system
  labels:
    k8s-app: my-etcd
spec:
  serviceName: my-etcd
  selector:
    matchLabels:
      k8s-app: my-etcd
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        k8s-app: my-etcd
      annotations:
        # Marks this pod as a critical add-on.
        scheduler.alpha.kubernetes.io/critical-pod: ''
    spec:
      tolerations:
        # We need this to schedule on the master no matter what else is going on, so tolerate everything.
        - key: ''
          operator: Exists
          effect: ''
        # This likely isn't needed due to the above wildcard, but keep it in for now.
        - key: CriticalAddonsOnly
          operator: Exists
      # Only run this pod on the master.
      nodeSelector:
        node-role.kubernetes.io/master: ""
      hostNetwork: true

      containers:
        - name: my-etcd
          image: quay.io/coreos/etcd:v3.3.11
          imagePullPolicy: IfNotPresent
          env:
            - name: ETCDCTL_API
              value: "3"
            - name: ETCDCTL_CACERT
              value: /var/contiv/etcd-secrets/ca.pem
          command:
            - /bin/sh
          args:
            - -c
            - /usr/local/bin/etcd --name=contiv-etcd --data-dir=/var/etcd/contiv-data
              --client-cert-auth --trusted-ca-file=/var/contiv/etcd-secrets/ca.pem
              --cert-file=/var/contiv/etcd-secrets/server.pem --key-file=/var/contiv/etcd-secrets/server-key.pem
              --peer-client-cert-auth --peer-trusted-ca-file=/var/contiv/etcd-secrets/ca.pem
              --peer-cert-file=/var/contiv/etcd-secrets/server.pem --peer-key-file=/var/contiv/etcd-secrets/server-key.pem
              --advertise-client-urls=https://0.0.0.0:12379 --listen-client-urls=https://0.0.0.0:12379 --listen-peer-urls=https://0.0.0.0:12380
              --cipher-suites TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
          volumeMounts:
            - name: var-etcd
              mountPath: /var/etcd/
            - name: etcd-secrets
              mountPath: /var/contiv/etcd-secrets
              readOnly: true
          resources:
            requests:
              cpu: 100m
      volumes:
        - name: etcd-secrets
          secret:
            secretName: my-etcd-secrets
            items:
            - key: caCert
              path: ca.pem
            - key: serverCert
              path: server.pem
            - key: serverKey
              path: server-key.pem
        - name: var-etcd
          hostPath:
            path: /var/etcd
            
---

apiVersion: v1
kind: Service
metadata:
  name: my-etcd
  namespace: kube-system
spec:
  type: NodePort
  selector:
    k8s-app: my-etcd
  ports:
    - port: 12379
      nodePort: 31379

---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: my-etcd-secrets
  namespace: kube-system
data:
  caCert: |-
    LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUREakNDQWZhZ0F3SUJBZ0lVR1dyM2pBNkZiUXVDb0ZyOW5EeDJvTSt2TGo4d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0RURUxNQWtHQTFVRUF4TUNRMEV3SGhjTk1UZ3hNREF5TVRBME16QXdXaGNOTWpNeE1EQXhNVEEwTXpBdwpXakFOTVFzd0NRWURWUVFERXdKRFFUQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCCkFMVmI1SGxXNFZoSkVUdXRJZlRRMGc5b1h0RFdIWnp3czcyenVyRDhjT2F1VXRleE50Q2xYR09pd3BuQVFDN0MKT29YY29aNWp6MlIwUGt0SVorZ0dsa3dzVncvZEhWTTNSbmd4cnVXNlg2SGsxbEdHNGIrcStSUmwvUUIxR1ArMApaNDVSMy8rVU13Kzc5M09TcHNaZDU0RmpvcGJEWWU5bDJTRD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kJzemRnUjltNmE2eHRrYkoKb0lZNW9yQ3A0VUR0U1pUdVRrTHJIa1dkRVlJNUhuYlB0aG9KQlpuWXFTVzB3N2h2WFQ2aUZod2pJUTAxRnoyZQpOUVVaa3YvaUoyb0wyblZwL0k2eTdLZnNNQ3BNek1Pdmo0amdYSlEzYWlTRmRvZ1VkcGplNHc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
                        

There is a nodeport service set up, that allows to access etcd at port 31397 on each node. The etcd uses certificates in order to secure access.

Modification helm values

The value etcd.useExternalInstance denoting whether to deploy own contiv etcd or use external one must be set to true. The connection settings to external etcd are defined in etcd.externalInstance (other values except in etcd section are ignored). Minimal config must contain definition of endpoints etcd.exteralInstance.endpoints where external etcd can be accessed. If external etcd instance is secured by using of certificates, values must also define secret name etcd.externalInstance.secretName in kube-system namespace. The secret must contain the following elements:

  • caCert certification authority used for validation of etcd server certificate
  • clientCert client certificate used for access the external etcd instance
  • clientKey corresponding key to clientCert

Modified values corresponding to instance deployed above

...
etcd:
  useExternalInstance: true
  externalInstance:
    secretName: my-etcd-secrets
    endpoints:
      - 127.0.0.1:31379

Deploy contiv-vpp

Once values are modified you can proceed by deploying contiv-vpp as describe in the README.

Please, note: bug report script doesn't read data from external etcd instance and the data is not auto-compacted by contiv/vpp either.