aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/operator/charts/etcd-operator/templates/NOTES.txt
blob: c33ee01444461d84f8960dc64cafb6ee9031a2e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{{- $clusterEnabled := (and (not .Release.IsInstall) .Values.customResources.createEtcdClusterCRD) -}}
{{- if and .Release.IsInstall .Values.customResources.createEtcdClusterCRD -}}
Not enabling cluster, the ThirdPartResource must be installed before you can create a Cluster. Continuing rest of normal deployment.

{{ end -}}

{{- if $clusterEnabled -}}
1. Watch etcd cluster start
  kubectl get pods -l etcd_cluster={{ .Values.etcdCluster.name }} --namespace {{ .Release.Namespace }} -w

2. Confirm etcd cluster is healthy
  $ kubectl run --rm -i --tty --env="ETCDCTL_API=3" --env="ETCDCTL_ENDPOINTS=http://{{ .Values.etcdCluster.name }}-client:2379" --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh -c 'watch -n1 "etcdctl  member list"'

3. Interact with the cluster!
  $ kubectl run --rm -i --tty --env ETCDCTL_API=3 --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh
  / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 put foo bar
  / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 get foo
  OK
  (ctrl-D to exit)
  
4. Optional
  Check the etcd-operator logs
  export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
  kubectl logs $POD --namespace={{ .Release.Namespace }}

{{- else -}}
1. etcd-operator deployed.
  If you would like to deploy an etcd-cluster set cluster.enabled to true in values.yaml
  Check the etcd-operator logs
    export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
    kubectl logs $POD --namespace={{ .Release.Namespace }}

{{- end -}}