I need some help getting kubernetes-dashboard working properly with an AWS ALB ingress. I have successfully deployed kubernetes-dashboard using the helm chart, and everything works correctly when accessing via kubectl proxy
or kubectl port-forward
. However, I get just a blank screen when accessing via an AWS ALB.
Not sure if this is relevant, but I've noticed that the <body><kd-root>
section is empty when accessed via the ALB, but non-empty when accessing via other methods (aka, port-fowarding). I'm wondering if I'm missing some key configuration parameter that makes this all work.
<!--
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kubernetes Dashboard</title>
<link rel="icon"
type="image/png"
href="assets/images/kubernetes-logo.png" />
<meta name="viewport"
content="width=device-width">
<link rel="stylesheet" href="styles.c3ed2dcd657a389ecc4d.css"></head>
<body>
<kd-root></kd-root>
<script src="runtime.6304db2809b97aa812ee.js" defer></script><script src="polyfills-es5.8f06d415489cadffc1de.js" nomodule defer></script><script src="polyfills.36db5820637aca3bd1e6.js" defer></script><script src="scripts.e296fd4cf14eea7ea0bd.js" defer></script><script src="main.17bd8ead409f8f047d6a.js" defer></script></body>
</html>
I'm using
- Kubernetes 1.18 (AWS EKS)
- kubernetes-dashboard 2.0.4
- kubernetes-dashboard helm chart 2.8.1
- chrome 85.0.4183.121
- firefox 81.0.2
I'm using a NodePort service. Here's my ingress resource (created by the helm chart).
$ kc get ingress kubernetes-dashboard -o yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
alb.ingress.kubernetes.io/backend-protocol: HTTPS
alb.ingress.kubernetes.io/healthcheck-path: /
alb.ingress.kubernetes.io/healthcheck-protocol: HTTPS
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]'
alb.ingress.kubernetes.io/scheme: internal
kubernetes.io/ingress.class: alb
meta.helm.sh/release-name: kubernetes-dashboard
meta.helm.sh/release-namespace: default
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
service.alpha.kubernetes.io/app-protocols: '{"https":"HTTPS"}'
creationTimestamp: "2020-10-13T21:45:48Z"
generation: 1
labels:
app.kubernetes.io/instance: kubernetes-dashboard
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kubernetes-dashboard
app.kubernetes.io/version: 2.0.4
helm.sh/chart: kubernetes-dashboard-2.8.1
name: kubernetes-dashboard
namespace: default
resourceVersion: "21742506"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/kubernetes-dashboard
uid: bda0ce1d-b112-45db-9fa4-c220e3e0e691
spec:
rules:
- host: dashboard.my-domain.com
http:
paths:
- backend:
serviceName: kubernetes-dashboard
servicePort: 443
path: /
status:
loadBalancer:
ingress:
- hostname: long-amazon-alb-url.us-east-1.elb.amazonaws.com
Nevermind, I found the problem. I had my ALB rules set to allow
/
only, instead of/*
which is what I really wanted.