我使用kubeadm工具进行了K8s(1.11)集群。它是集群中的1个主节点和1个节点。
我在那里应用了仪表板UI。kubectl创建-f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
创建的服务帐户(此链接之后:https : //github.com/kubernetes/dashboard/wiki/Creating-sample-user)
Run Code Online (Sandbox Code Playgroud)apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kube-system
和
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kube-system
Run Code Online (Sandbox Code Playgroud)
启动kube代理: kubectl proxy --address 0.0.0.0 --accept-hosts '.*'
并使用以下URL从远程主机访问仪表板: http://<k8s master node IP>:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login
它要求登录令牌:使用以下命令获得令牌: kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
复制并在浏览器中应用令牌后。.它没有登录。它也没有显示身份验证错误...不确定这是错的吗?我的令牌错误还是我的kube proxy命令错误?
我正在尝试设置 aws EKS 集群并希望从我的本地 Windows 工作站连接该集群。无法连接。这是我做的步骤;
Command:kubectl.exe get svc
Run Code Online (Sandbox Code Playgroud)
output:
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
could not get token: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors …Run Code Online (Sandbox Code Playgroud)