반응형
# Create a new namespace for ELK
kubectl create namespace elk
# Deploy Elasticsearch
kubectl apply -f https://download.elastic.co/downloads/eck/1.7.0/all-in-one.yaml -n elk
# Deploy Kibana
kubectl apply -f https://github.com/elastic/helm-charts/releases/download/kibana-7.16.2/kibana-7.16.2.tgz -n elk
# Deploy Logstash
kubectl apply -f https://github.com/elastic/helm-charts/releases/download/logstash-7.16.2/logstash-7.16.2.tgz -n elk
This script does the following:
- Creates a new namespace called elk to isolate the ELK stack components.
- Deploys Elasticsearch using the Elastic Cloud on Kubernetes (ECK) operator. The all-in-one.yaml file contains the configuration for Elasticsearch, including the number of nodes and the resources allocated to each node.
- Deploys Kibana using a Helm chart from the Elastic Helm repository. The chart is configured to use the Elasticsearch cluster that was deployed in the previous step.
- Deploys Logstash using another Helm chart from the Elastic Helm repository. Logstash is configured to consume logs from the Kubernetes cluster and forward them to Elasticsearch.
After running this script, you should have a functioning ELK stack running in your Kubernetes cluster. You can access Kibana by creating a port-forward from your local machine to the Kibana service, or by exposing the service as a LoadBalancer or NodePort service.
반응형
'IT.en_US > Cloud_OuterArchitecture' 카테고리의 다른 글
Why Choose Amazon OpenSearch over Elasticsearch (0) | 2023.02.20 |
---|---|
What's new in Istio 1.8 (0) | 2023.02.16 |
What is a Service Mesh & Why (0) | 2023.02.12 |
Understanding Istio: The Service Mesh for Microservices (0) | 2023.02.12 |
Setting up JMeter on Linux using CLI Mode (0) | 2023.02.08 |