Skip to content

Dashy | Kustomize

Deployment

YAML
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: dashy
  name: dashy
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dashy
  template:
    metadata:
      labels:
        app: dashy
    spec:
      containers:
      - image: lissy93/dashy:latest
        imagePullPolicy: Always
        name: dashy
        ports:
        - containerPort: 80
          protocol: TCP
        resources:
          limits:
            cpu: "1"
            memory: 2Gi
          requests:
            cpu: 50m
            memory: 16Mi
        volumeMounts:
        - mountPath: /app/public
          name: nfs-dashy
      volumes:
      - name: nfs-dashy
        nfs:
          path: /some-nfs/dashy
          server: 1xx.xx.1xx.1x

Service

YAML
metadata:
  labels:
    app: dashy
  name: dashy
  namespace: default
spec:
  loadBalancerIP: 100.100.100.101
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: dashy
  type: LoadBalancer

Kustomization

YAML
resources:
- deployment.yaml
- service.yaml