kubernetes-dashboard.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: k8s-dashboard
  5. annotations:
  6. metallb.universe.tf/address-pool: default
  7. spec:
  8. ports:
  9. - port: 80
  10. targetPort: 9090
  11. selector:
  12. app: dashboard
  13. type: LoadBalancer
  14. ---
  15. # Hosting
  16. apiVersion: networking.k8s.io/v1
  17. kind: Ingress
  18. metadata:
  19. name: kubernetes-dashboard
  20. annotations:
  21. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  22. ## basic auth for index
  23. # type of authentication
  24. nginx.ingress.kubernetes.io/auth-type: basic
  25. # name of the secret that contains the user/password definitions
  26. nginx.ingress.kubernetes.io/auth-secret: basic-auth
  27. # message to display with an appropriate context why the authentication is required
  28. nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  29. spec:
  30. tls:
  31. - hosts:
  32. - dashboard.monkeybox.org
  33. secretName: dashboard-tls
  34. rules:
  35. - host: dashboard.monkeybox.org
  36. http:
  37. paths:
  38. - path: /
  39. pathType: Prefix
  40. backend:
  41. service:
  42. name: k8s-dashboard
  43. port:
  44. number: 80