---
# System prepended metadata

title: K8S - ES secretes
tags: [Elasticsearch]

---

---
title: K8S - ES secretes
tags: Elasticsearch
description: View the slide with "Slide Mode".
---

# K8S - ES secretes

<!-- Put the link to this slide here so people can follow -->
## 1. 帳號密碼
```bash=
kubectl create secret generic elastic-credentials --from-literal=password=密碼自訂 --from-literal=username=elastic  --namespace=logging-v8
```

## 2. 憑證
- 先透過一般模式產生 `.p12` 檔案
```bash=
kubectl create secret generic elastic-certificates --from-file=/home/phuser/EFK-v7/elasticsearch/elastic-certificates.p12 --namespace=logging-v8
```