Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linuxmalaysia/662899b296e4a84d00299811622af12f to your computer and use it in GitHub Desktop.
Save linuxmalaysia/662899b296e4a84d00299811622af12f to your computer and use it in GitHub Desktop.
Platform Kubernetes Setempat Untuk Elastic Cloud Kubernetes
Platform Kubernetes Setempat Untuk Elastic Cloud Kubernetes
A) Rancher 2.0 Didalam K3S
Gabungan 3 Nodes master K3S dengan MariaDB Cluster untuk cluster K3S
MariaDB Cluster dengan mariadbcopy.
Cluster A adalah untuk Rancher 2.0, diasingkan. Nodes tidak perlu besar.
Pemasangan K3S
https://rancher.com/docs/k3s/latest/en/installation/datastore/
Pemasangan Rancher 2.0 Pilihan K3S
https://rancher.com/docs/rancher/v2.x/en/installation/k8s-install/kubernetes-rke/
B) Cluster K8S dengan RKE, dilancarkan oleh Rancher 2.0
Gunakan Wizard yang disediakan oleh Rancher 2.0
3 Master dan 1 Worker (Boleh ditambah bila perlu)
Pasangkan Longhorn Storage untuk persistant storage (Rancher Offical Catalog)
https://github.com/longhorn/longhorn
C) Aktifkan Elastic Cloud on Kubernetes
https://www.elastic.co/downloads/elastic-cloud-kubernetes
Pada terminal (Dapatkan kubeconfig daripada Rancher 2.0 Web interface)
Pasang kubectl dahulu
====
https://kubernetes.io/docs/tasks/tools/install-kubectl/
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
atau
sudo apt update && sudo apt install -y apt-transport-https gnupg2
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt update
sudo apt install -y kubectl
====
kubectl apply -f https://download.elastic.co/downloads/eck/1.1.1/all-in-one.yaml
D) Masukkan Catalog Helm untuk Elastic dalam Cluster B
Ini perlu dilakukan dalam Rancher Offical Catalog
https://www.linode.com/docs/kubernetes/how-to-deploy-the-elastic-stack-on-kubernetes/
https://github.com/elastic/helm-charts/tree/master/elasticsearch
E) Buat Project dan namespace khusus untuk depolyment Elastic Stack
Pemasangan lanjut rujuk
https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html
Contoh konfigurasi
https://github.com/elastic/cloud-on-k8s/tree/master/config/samples
Gunakan Menu Apps pada Project khusus yang telah dibuat.
Work in progress
Harisfazillah Jamel
17052020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment