Kubernetes hosting?

Hi

First off: thank you to team RevvoX for the tremendous amount of work in reverse engineering and building teddyCloud - it’s an awesome community.

As I am hosting everything based on Kubernetes, I have created some yaml files working for my own deployment (using k3s). I would love to contribute by sharing my templates - but there is a bit of work involved in modifying and publishing them, they could go into the tutorials as well. Is there any interest?

Best regards,
Tobias

Feel free to share it :slight_smile:

You can post a how to here or add one in the wiki :slight_smile: I am sure there will be some which would be happy to get a help on that

Hi,

I’m running my teddycloud on Kubernetes instance.
In my case i use Talos Linux to run Kubernetes.
Longhorn is the storage provider.
I use metallb as loadbalancer. This allows to expose services with virtual ip adresses.
Traefik as reverse proxy with certmanager

Here is my config:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: teddycloud  
spec:
  replicas: 1
  selector:
    matchLabels:
      app: teddycloud
  template:
    metadata:
      labels:
        app: teddycloud
    spec:
      containers:
      - name: teddycloud
        # renovate: 
        image: ghcr.io/toniebox-reverse-engineering/teddycloud:tc_v0.6.3
        ports:
        # Uncomment the following as needed:
          - containerPort: 80
        # - containerPort: 8443
          - containerPort: 443
        volumeMounts:
        - name: certs
          mountPath: /teddycloud/certs
        - name: config
          mountPath: /teddycloud/config
        - name: content
          mountPath: /teddycloud/data/content
        - name: library
          mountPath: /teddycloud/data/library
        - name: firmware
          mountPath: /teddycloud/data/firmware
        - name: cache
          mountPath: /teddycloud/data/cache
      restartPolicy: Always
      volumes:
      - name: certs
        persistentVolumeClaim:
          claimName: teddycloud-certs
      - name: config
        persistentVolumeClaim:
          claimName: teddycloud-config
      - name: content
        persistentVolumeClaim:
          claimName: teddycloud-content
      - name: library
        persistentVolumeClaim:
          claimName: teddycloud-library
      - name: firmware
        persistentVolumeClaim:
          claimName: teddycloud-firmware
      - name: cache
        persistentVolumeClaim:
          claimName: teddycloud-cache

service:

apiVersion: v1
kind: Service
metadata:
  name: teddycloud
  labels:
    app: teddycloud
spec:
  type: ClusterIP
  ports:
  # Uncomment the following as needed:
  - name: http
    port: 80
    targetPort: 80


---
apiVersion: v1
kind: Service
metadata:
  name: teddycloud-raw
  labels:
    app: teddycloud
spec:
  type: LoadBalancer
  ports: 
  - name: connection
    port: 443
    targetPort: 443  #Port is needed for the connection for the box, must not be changed!
  selector:
    app: teddycloud

pvc:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-certs
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-config
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-content
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-library
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 5Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-firmware
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 2Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: teddycloud-cache
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 2Gi

ingress:

---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: teddycloud  
  annotations: 
    kubernetes.io/ingress.class: traefik-external
spec:
  entryPoints:
    - websecure
  routes:    
    - match: Host(`teddycloud.homelab.host`)
      kind: Rule
      services:
        - name: teddycloud
          port: 80      
  tls:
    secretName: my-tls

kustomization.yaml

namespace: teddycloud

commonLabels:
  app: teddycloud

resources:
  - pvc.yaml
  - service.yaml
  - deployment.yaml
  - ingress.yaml

Hope this helps