Kubernetes部署tinymediamanager 电影信息和海报

  sre


镜像地址
docker直接运行tinymediamanager 电影信息和海报

pvc tinymediamanager

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: tinymediamanager-data
  namespace: sre
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: "250Gi"
  volumeName: 
  storageClassName: nfs
--- 
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: tinymediamanager-config
  namespace: sre
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: "250Gi"
  volumeName: 
  storageClassName: nfs

Deployment tinymediamanager-server

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tinymediamanager-server
  namespace: sre
  labels:
    app: tinymediamanager-server
spec:
  selector:
    matchLabels:
      app: tinymediamanager-server
  template:
    metadata:
      labels:
        app: tinymediamanager-server
    spec:
      containers:
      - name: tinymediamanager-server
        image: romancin/tinymediamanager
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 5800
          name: http
        - containerPort: 5900
          name: tcp
        env:
        - name: GROUP_ID
          value: '0'
        - name: USER_ID
          value: '0'
        volumeMounts:
        - name: tinymediamanager-data
          mountPath: /media
        - name: tinymediamanager-config
          mountPath: /config 
        - name: localtime
          mountPath: /etc/localtime
          readOnly: true
      volumes:
      - name: localtime
        mountPath: /etc/localtime
      - name: tinymediamanager-data
        persistentVolumeClaim:
          claimName: tinymediamanager-data
      - name: tinymediamanager-config
        persistentVolumeClaim:
          claimName: tinymediamanager-config

svc

apiVersion: v1
kind: Service
metadata:
  name: tinymediamanager-server
  namespace: sre
spec:
  type: NodePort
  ports:
  - name: http
    protocol: TCP
    port: 5800
    nodePort: 30099
    targetPort: http
  selector:
    app: tinymediamanager-server

LEAVE A COMMENT

Captcha Code