working on kube
This commit is contained in:
55
kubernetes/jellyfin/deployment.yml
Normal file
55
kubernetes/jellyfin/deployment.yml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: jellyfin
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: jellyfin
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: jellyfin
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: jellyfin
|
||||||
|
image: jellyfin/jellyfin
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /config
|
||||||
|
- name: cache-volume
|
||||||
|
mountPath: /cache
|
||||||
|
- name: music-volume
|
||||||
|
mountPath: /music
|
||||||
|
- name: movies-volume
|
||||||
|
mountPath: /movies
|
||||||
|
- name: tvshows-volume
|
||||||
|
mountPath: /tvshows
|
||||||
|
ports:
|
||||||
|
- containerPort: 8096
|
||||||
|
name: jellyfin
|
||||||
|
env:
|
||||||
|
- name: JELLYFIN_PublishedServerUrl
|
||||||
|
value: "https://jellyfin.alexmickelson.guru"
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
hostPath:
|
||||||
|
path: /data/jellyfin/config
|
||||||
|
- name: cache-volume
|
||||||
|
hostPath:
|
||||||
|
path: /data/jellyfin/cache
|
||||||
|
- name: music-volume
|
||||||
|
hostPath:
|
||||||
|
path: /data/jellyfin/music
|
||||||
|
- name: movies-volume
|
||||||
|
hostPath:
|
||||||
|
path: /data/jellyfin/movies
|
||||||
|
- name: tvshows-volume
|
||||||
|
hostPath:
|
||||||
|
path: /data/jellyfin/tvshows
|
||||||
|
restartPolicy: Always
|
||||||
14
kubernetes/jellyfin/ingress.yml
Normal file
14
kubernetes/jellyfin/ingress.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: jellyfin-ingress
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: jellyfin.alexmickelson.guru
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
service: jellyfin
|
||||||
|
port: 8096
|
||||||
13
kubernetes/jellyfin/service.yml
Normal file
13
kubernetes/jellyfin/service.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: jellyfin
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: jellyfin
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8096
|
||||||
|
targetPort: 8096
|
||||||
|
type: ClusterIP
|
||||||
55
kubernetes/nextcloud/cron-dep.yml
Normal file
55
kubernetes/nextcloud/cron-dep.yml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-cron
|
||||||
|
labels:
|
||||||
|
app: nextcloud-cron
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud-cron
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-cron
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nextcloud
|
||||||
|
image: nextcloud:latest
|
||||||
|
command: [ "/cron.sh" ]
|
||||||
|
environment:
|
||||||
|
- TZ=America/Denver
|
||||||
|
- OVERWRITEPROTOCOL=https
|
||||||
|
- MYSQL_PASSWORD=slkdnflksnelkfnsdweoinv
|
||||||
|
- MYSQL_DATABASE=nextcloud
|
||||||
|
- MYSQL_USER=nextcloud
|
||||||
|
- MYSQL_HOST=nextcloud-db
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-www
|
||||||
|
hostPath:
|
||||||
|
path: /data/nextcloud/html
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: music
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/music
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: movies
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/movies
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: tvshows
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/tvshows
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: shared
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/shared
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: audiobooks
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/audiobooks
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
37
kubernetes/nextcloud/db-dep.yml
Normal file
37
kubernetes/nextcloud/db-dep.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-db
|
||||||
|
labels:
|
||||||
|
app: nextcloud-db
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud-db
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud-db
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mariadb
|
||||||
|
image: mariadb:latest
|
||||||
|
args:
|
||||||
|
[
|
||||||
|
"--transaction-isolation=READ-COMMITTED",
|
||||||
|
"--log-bin=binlog",
|
||||||
|
"--binlog-format=ROW",
|
||||||
|
]
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: your_root_password
|
||||||
|
MYSQL_DATABASE: nextcloud
|
||||||
|
MYSQL_USER: nextcloud
|
||||||
|
MYSQL_PASSWORD: slkdnflksnelkfnsdweoinv
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-db-data
|
||||||
|
hostPath:
|
||||||
|
path: /data/nextcloud-db
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
54
kubernetes/nextcloud/web-dep.yml
Normal file
54
kubernetes/nextcloud/web-dep.yml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nextcloud
|
||||||
|
labels:
|
||||||
|
app: nextcloud
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nextcloud
|
||||||
|
image: nextcloud:latest
|
||||||
|
environment:
|
||||||
|
- TZ=America/Denver
|
||||||
|
- OVERWRITEPROTOCOL=https
|
||||||
|
- MYSQL_PASSWORD=slkdnflksnelkfnsdweoinv
|
||||||
|
- MYSQL_DATABASE=nextcloud
|
||||||
|
- MYSQL_USER=nextcloud
|
||||||
|
- MYSQL_HOST=nextcloud-db
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-www
|
||||||
|
hostPath:
|
||||||
|
path: /data/nextcloud/html
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: music
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/music
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: movies
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/movies
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: tvshows
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/tvshows
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: shared
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/shared
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
- name: audiobooks
|
||||||
|
hostPath:
|
||||||
|
path: /data/media/audiobooks
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
Reference in New Issue
Block a user