AWS ELB或内部LB后面的Kubernetes Dashboard



我已经通过CCD_ 1。

我可以通过运行kubectl proxy连接到仪表板。

我的问题是如何通过内部LB或ELB公开此仪表板?

我已经更改了kubernetes仪表板服务

kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
annotations:
# service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
spec:
type: LoadBalancer
# loadBalancerSourceRanges:
# - x.x.x.x/32
ports:
- port: 80
targetPort: 8443
protocol: TCP
selector:
k8s-app: kubernetes-dashboard

然后我点击了ELB DNS记录,没有任何返回(例如-xxxxxxxxxxxx.us-east-1.ELB.amazonaws.com(。

有人知道如何解决这个问题吗?

注意-这是一个POC集群,我目前没有任何安全问题。

谢谢

kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
spec:
type: LoadBalancer
ports:
- port: 443
protocol: TCP
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard

https://<internal-lb-dns-record>应该起作用。

最新更新