简体   繁体   English

如何修复 linux 上的 kubernetes 仪表板设置上的主机端口问题?

[英]How to fix host-port issue on kubernetes dashboard setup on linux?

In the Amazon Linux machine while trying to install a Kubernetes dashboard there was an error which is been unpredictable.在尝试安装 Kubernetes 仪表板时,在 Amazon Linux 机器中,出现了一个无法预测的错误。

This is a new Amazon Linux server in AWS,there was an error while installing the Kubernetes dashboard regarding host and port issue, but so nothing has configured in it as a new server.这是 AWS 中的一个新的 Amazon Linux 服务器,在安装 Kubernetes 仪表板时出现关于主机和端口问题的错误,但因此没有在其中配置任何新服务器。 And I've installed kubectl and awscli for checking but it doesn't work.我已经安装了 kubectl 和 awscli 进行检查,但它不起作用。 I've tried on all community support but there is no issue placed like mine.我已经尝试了所有社区支持,但没有像我这样的问题。

while running the command运行命令时

$ kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml 

It throws the error它抛出错误

The connection to the server localhost:8080 was refused - did you specify the right host or port?

setup kubectl correctly正确设置 kubectl

add admin.conf (your cluster config) in your KUBECONFIG在您的KUBECONFIG中添加 admin.conf(您的集群配置)

Example:例子:

export KUBECONFIG=$HOME/.kube/admin.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM