Update README.md with Docker build and Kubernetes debug instructions
- Added instructions for building and pushing Docker images with specific tags. - Included steps for creating Kubernetes secrets from local .env files. - Provided guidance on manually creating and removing a debug pod in Kubernetes.
This commit is contained in:
39
README.md
39
README.md
@@ -101,6 +101,45 @@ docker build -t ncore-hnr:local .
|
||||
docker run --rm --env-file .env -v "$PWD/data:/data" ncore-hnr:local
|
||||
```
|
||||
|
||||
Build and push to Docker Hub with a tag in the form `shortgitsha-epoch`:
|
||||
|
||||
```bash
|
||||
make docker-publish
|
||||
```
|
||||
|
||||
Build and push the shell-capable debug image:
|
||||
|
||||
```bash
|
||||
make docker-debug-publish
|
||||
```
|
||||
|
||||
## Kubernetes
|
||||
|
||||
The `k8s/` folder contains a CronJob, PVC, and example Secret. Store real secrets out of git.
|
||||
|
||||
For the Flux deployment, create or update the Kubernetes Secret from your local `.env` without committing the secret values:
|
||||
|
||||
```bash
|
||||
kubectl -n media-server create secret generic ncore-hnr-secrets \
|
||||
--from-env-file=.env \
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
```
|
||||
|
||||
Create a temporary debug pod manually:
|
||||
|
||||
```bash
|
||||
kubectl apply -f k8s/debug-pod.yaml
|
||||
kubectl -n media-server exec -it ncore-hnr-debug -- sh
|
||||
```
|
||||
|
||||
Inside the pod:
|
||||
|
||||
```bash
|
||||
ncore-hnr --dry-run=true --notification-dry-run=true --alert-after=0s
|
||||
```
|
||||
|
||||
Remove the debug pod when finished:
|
||||
|
||||
```bash
|
||||
kubectl -n media-server delete pod ncore-hnr-debug
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user