add grafana kubectl
This commit is contained in:
23
README.md
23
README.md
@@ -20,10 +20,12 @@ A project to store container-based hosting stuff.
|
|||||||
- [Minecraft](#minecraft)
|
- [Minecraft](#minecraft)
|
||||||
- [Nimcraft](#nimcraft)
|
- [Nimcraft](#nimcraft)
|
||||||
- [Testing](#testing)
|
- [Testing](#testing)
|
||||||
|
- [Courtnie](#courtnie)
|
||||||
- [Snapdrop](#snapdrop)
|
- [Snapdrop](#snapdrop)
|
||||||
- [Jellyfin](#jellyfin)
|
- [Jellyfin](#jellyfin)
|
||||||
- [Iperf3](#iperf3)
|
- [Iperf3](#iperf3)
|
||||||
- [Wordpress](#wordpress)
|
- [Wordpress](#wordpress)
|
||||||
|
- [Grafana](#grafana)
|
||||||
- [Upgrading](#upgrading)
|
- [Upgrading](#upgrading)
|
||||||
- [Nodes](#nodes)
|
- [Nodes](#nodes)
|
||||||
- [K3S](#k3s)
|
- [K3S](#k3s)
|
||||||
@@ -612,6 +614,17 @@ helm upgrade --install \
|
|||||||
--set port=25566
|
--set port=25566
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Courtnie
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade --install \
|
||||||
|
courtniecraft \
|
||||||
|
./helm/minecraft \
|
||||||
|
--namespace courtniecraft \
|
||||||
|
--create-namespace \
|
||||||
|
--set port=25568
|
||||||
|
```
|
||||||
|
|
||||||
### Snapdrop
|
### Snapdrop
|
||||||
|
|
||||||
Snapdrop is a file sharing app that allows airdrop-like functionality over the web
|
Snapdrop is a file sharing app that allows airdrop-like functionality over the web
|
||||||
@@ -665,6 +678,16 @@ helm upgrade --install \
|
|||||||
oci://registry-1.docker.io/bitnamicharts/wordpress
|
oci://registry-1.docker.io/bitnamicharts/wordpress
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Grafana
|
||||||
|
|
||||||
|
<https://grafana.com/docs/grafana/latest/setup-grafana/installation/kubernetes/>
|
||||||
|
|
||||||
|
Grafana has a kubernetes yaml they prefer you use. See `kubectl/grafana.yaml`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl apply -f kubectl/grafana.yaml
|
||||||
|
```
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
### Nodes
|
### Nodes
|
||||||
|
|||||||
114
kubectl/grafana.yaml
Normal file
114
kubectl/grafana.yaml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: grafana-pvc
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
storageClassName: zfs-iscsi-enc1
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: grafana
|
||||||
|
name: grafana
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: grafana
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: grafana
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 472
|
||||||
|
supplementalGroups:
|
||||||
|
- 0
|
||||||
|
containers:
|
||||||
|
- name: grafana
|
||||||
|
image: grafana/grafana:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: http-grafana
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /robots.txt
|
||||||
|
port: 3000
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 2
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
tcpSocket:
|
||||||
|
port: 3000
|
||||||
|
timeoutSeconds: 1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 750Mi
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/grafana
|
||||||
|
name: grafana-pv
|
||||||
|
volumes:
|
||||||
|
- name: grafana-pv
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: grafana-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 3000
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http-grafana
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: grafana
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
|
namespace: grafana
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
kubernetes.io/ingress.class: nginx
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.org/client-max-body-size: "0"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: grafana.reeseapps.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: grafana
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- grafana.reeseapps.com
|
||||||
|
secretName: grafana-tls-cert
|
||||||
Reference in New Issue
Block a user