我已经通过K8s部署了kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
仪表板。
我可以通过运行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记录,没有返回任何内容(例如- xxxxxxxxxxx.us-east-1.elb.amazonaws.com)。
有人知道怎么解决这个问题吗?
注意-这是一个POC集群,目前我对安全性没有任何问题。
谢谢
发布于 2018-07-18 17:43:34
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>
应该能工作。
https://stackoverflow.com/questions/51246026
复制相似问题