https://github.com/fan9704/k3d-efk
A Simple EFK Course by k3s in docker
https://github.com/fan9704/k3d-efk
efk elasticstack k3d k3s
Last synced: 4 months ago
JSON representation
A Simple EFK Course by k3s in docker
- Host: GitHub
- URL: https://github.com/fan9704/k3d-efk
- Owner: fan9704
- Created: 2025-01-18T08:45:22.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-29T07:50:18.000Z (9 months ago)
- Last Synced: 2025-04-29T08:39:13.946Z (9 months ago)
- Topics: efk, elasticstack, k3d, k3s
- Language: Shell
- Homepage:
- Size: 1020 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Developer Groups on Campus NTUST ElasticStack 課程
> Author FKT
---
## In this course you will learned
1. K3d
2. Elasticstack
3. high availability
4. Elasticsearch DSL
5. Related DevOps Issues
6. A liite be Kubernetes
---
## Preview
本次課程完成樣貌,一個自動監控多節點的資源儀表板




---
## Getting Started
### 1. 安裝 k3d kubectl
```shell=
curl https://raw.githubusercontent.com/fan9704/KubernetsInstallScript/refs/heads/master/install_k3d.sh | bash
```
### 2. 配置 kubectl context
```shell
export KUBECONFIG="$(k3d kubeconfig write k3s-default)"
```
若要長期使用,可以配置到 *.bashrc* or *.zshrc* 末端
### 3. Setup EFK
```shell
git clone https://github.com/fan9704/k3d-EFK.git
cd k3d-EFK
cd efk
kubectl apply -f .
```
### 4. PortForwards EFK
先找到你的 Kibana Pod
```shell
kubectl get pod
```
```shell
kubectl port-forward elasticsearch-kibana-XXXX 5601:5601
```
### 5. Setup Index Pattern
進入 Kibana > Stack Management > Index Pattern

### 6. Create Dashboard
進入 Kibana > Dashboard > Create Dashboard

### 7. Scale up Cluster
新增成三節點分散式 Cluster
```shell
# 新增節點 1
k3d node create node-1 -c k3s-default --role agent
# 新增節點 2
k3d node create node-2 -c k3s-default --role agent
```