Skip to content

Commit

Permalink
Merge pull request #62 from martinyung/feat/add-k8s-manifest
Browse files Browse the repository at this point in the history
add k8s manifest for deployment on k8s - fix #36
  • Loading branch information
zeitlinger authored Jun 11, 2024
2 parents b8de6fb + 8c7827a commit f715297
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ The Docker image is available on Docker hub: https://hub.docker.com/r/grafana/ot
./run-lgtm.sh
```

## Run lgtm in kubernetes
```sh
# create k8s resources
kubectl apply -f k8s/lgtm.yaml

# port forwarding
kubectl port-forward service/lgtm 3000:3000 4317:4317 4318:4318
```

## Send OpenTelemetry Data

There's no need to configure anything: The Docker image works with OpenTelemetry's defaults.
Expand Down
43 changes: 43 additions & 0 deletions k8s/lgtm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# this is intended for demo / testing purposes only, not for production usage
apiVersion: v1
kind: Service
metadata:
name: lgtm
spec:
selector:
app: lgtm
ports:
- name: grafana
protocol: TCP
port: 3000
targetPort: 3000
- name: otel-grpc
protocol: TCP
port: 4317
targetPort: 4317
- name: otel-http
protocol: TCP
port: 4318
targetPort: 4318
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lgtm
spec:
replicas: 1
selector:
matchLabels:
app: lgtm
template:
metadata:
labels:
app: lgtm
spec:
containers:
- name: lgtm
image: grafana/otel-lgtm:latest
ports:
- containerPort: 3000
- containerPort: 4317
- containerPort: 4318

0 comments on commit f715297

Please sign in to comment.