forked from pires/kubernetes-elasticsearch-cluster
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathdeploy
executable file
·49 lines (36 loc) · 1.27 KB
/
deploy
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then
export KUBECONFIG=~/.kube/config
fi
# CAUTION - setting NAMESPACE will deploy most components to the given namespace
# however some are hardcoded to 'monitoring'. Only use if you have reviewed all manifests.
if [ -z "${NAMESPACE}" ]; then
NAMESPACE=logging
fi
kubectl create namespace "$NAMESPACE"
kctl() {
kubectl --namespace "$NAMESPACE" "$@"
}
# alias kctl='kubectl --namespace logging'
# Deploy ElasticSearch configmap
kctl apply -f es-configmap.yaml
# As an alternative, replace master, client and data manifests applied above
# with the ones below to have a three-node cluster with all roles in all nodes.
kctl apply -f es-full-svc.yaml
kctl apply -f es-full-statefulset.yaml
until kctl rollout status statefulset es-full > /dev/null 2>&1; do sleep 1; printf "."; done
# Deploy Curator
kctl apply -f es-curator-configmap.yaml
kctl apply -f es-curator-cronjob.yaml
# Deploy Cerebro
kctl apply -f cerebro.yaml
kctl apply -f cerebro-external-ingress.yaml
# Deploy Kibana
kctl apply -f kibana-configmap.yaml
kctl apply -f kibana-svc.yaml
kctl apply -f kibana-deployment.yaml
kctl apply -f kibana-external-ingress.yaml
# Deploy Fluentd
kctl apply -f fluentd-configmap.yaml
kctl apply -f fluentd-daemonset.yaml
echo "done!"