Ajout pod heimdall-node

deployement

La commande docker avec le filesystem preparé

docker run -d \
  --name=heimdall \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Europe/London \
  -p 80:80 \
  -p 443:443 \
  -v </path/to/appdata/config>:/config \
  --restart unless-stopped \
  lscr.io/linuxserver/heimdall

traduction en kubernetes deploy :

apiVersion: apps/v1
kind: Deployment
metadata:
  name: heimdallserver 
  namespace: default
  labels:
    app: heimdall
spec:
  replicas: 1
  selector:
    matchLabels:
      app: heimdall
  template:
    metadata:
      labels:
        run: heimdallserver 
        app: heimdall
    spec:
      containers:
      - name: heimdallserver 
        image: lscr.io/linuxserver/heimdall
        env:
          - name: "UID"
            value: "1000"
          - name: "GID"
            value: "100"  
        ports:
        - containerPort: 80
          name: heimdall-http
        - containerPort: 443
          name: heimdall-https
        volumeMounts:
        - mountPath: /config
          name: heimdall-config
      volumes:
      - name: heimdall-config
        hostPath:
          type: DirectoryOrCreate
          path: /usr/kubedata/heimdallserver/config
---
apiVersion: v1
kind: Service
metadata:
  name: heimdall-svc
spec:
  selector:
    app: heimdall
  ports:
    - name: http
      port: 80
      targetPort: 80
      nodePort: 32501
    - name: https
      port: 443
      targetPort: 443
  type: NodePort

puis on recupere le port d’exposition

kubectl get all --all-namespaces | grep heimdall

resultat le dashboard est accecible https://<master-ip>:32501

Leave a Comment