OUTDATED - Please use this link for the new script and instructions
https://www.gooksu.com/2022/09/new-elastic-kubernetes-script-deploy-elastick8s-sh/
I developed the deploy-eck.sh script to easily deploy the elastic stack in k8s to quickly test things.
Did a quick update to the script.
- operator mode. Now you can run the script just to deploy the operator only and apply a trial license. You can develop your own test cases etc in this mode. If you work out of
~/eckstack
and name your manifest files*.yaml
when you run thedeploy-eck.sh cleanup
it will cleanup all of your items as well.
> ./deploy-eck.sh cleanup
********** Cleaning up **********
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/fleet.yaml
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/kibana-eck-lab.yaml
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/elasticsearch-eck-lab.yaml
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/license.yaml
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/operator.yaml
[DEBUG] DELETING Resources for: /Users/jlim/eckstack/crds.yaml
[DEBUG] All cleanedup
$ ./deploy-eck.sh operator 2.3.0
********** Deploying ECK 2.3.0 OPERATOR **************
[DEBUG] ECK 2.3.0 downloading crds: crds.yaml
[DEBUG] ECK 2.3.0 downloading operator: operator.yaml
[DEBUG] ECK Operator is starting. Checking again in 20 seconds. If the operator does not goto Running status in few minutes something is wrong. CTRL-C please
[DEBUG] ECK 2.3.0 OPERATOR is HEALTHY
NAME READY STATUS RESTARTS AGE
pod/elastic-operator-0 1/1 Running 0 23s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/elastic-webhook-server ClusterIP 10.88.10.170 <none> 443/TCP 23s
NAME READY AGE
statefulset.apps/elastic-operator 1/1 23s
[DEBUG] ECK 2.3.0 Creating license.yaml
[DEBUG] ECK 2.3.0 Applying trial license
- Changed the fleet mode to add a LB endpoint to the fleet server. Previously you could only reach fleet server if you were in the k8s environment only. Now that LB endpoint is added you can reach it via the network. - this leads to fun things!
$ kubectl get svc | egrep "NAME|fleet"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/fleet-server-agent-http LoadBalancer 10.88.5.33 34.121.254.61 8220:31484/TCP 3m38s
- fleet matured a lot going from
7.x
->8.0
->8.2+++
and starting with 8.2+ you can add multiple outputs to your fleet settings so that you can use logstash. By using logstash it opens up a possiblity to send your data to a different deployment! For the fleet mode anything above 8.2.0, the script will configure the external output and aExternal Agent Policy
using the external output so that you can easily registerelastic-agent
from outside of k8s environment to send send data into your elastic stack hosted on k8s. Also starting 8.2+ I added the fingerprint of the CA and addedssl.verification_mode: none
to make ingestion from the outside easier.
Screenshot from 7.x fleet settings
Screenshot from 8.0.x fleet settings
Screenshots from 8.2.x fleet settings
Please note the differences between each.
Enjoy!!
One Comment