error: no configuration has been provided, try setting KUBERNET

本文涉及的产品
容器服务 Serverless 版 ACK Serverless,952元额度 多规格
容器服务 Serverless 版 ACK Serverless,317元额度 多规格
简介: error: no configuration has been provided, try setting KUBERNET

问题:在node节点执行出现以下错误。

[root@localhost ~]# kubectl get node

error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

1.在k8s 的master节点可以看到 admin.conf

[root@localhost kubernetes]# pwd

/etc/kubernetes

[root@localhost kubernetes]# ls

admin.conf  controller-manager.conf  kubelet.conf  manifests  pki  scheduler.conf

2. 在主节点移动到node

[root@localhost kubernetes]# scp admin.conf root@192.168.31.121:/etc/kubernetes

3.添加变量

[root@localhost kubernetes]# export KUBECONFIG=/etc/kubernetes/admin.conf

[root@localhost kubernetes]# source /etc/profile

4.可以看到已经可以了

[root@localhost kubernetes]# kubectl get node

NAME     STATUS   ROLES    AGE   VERSION

master   Ready    master   54m   v1.18.0

node1    Ready    <none>   27m   v1.18.0

[root@localhost kubernetes]#

相关实践学习
容器服务Serverless版ACK Serverless 快速入门:在线魔方应用部署和监控
通过本实验,您将了解到容器服务Serverless版ACK Serverless 的基本产品能力,即可以实现快速部署一个在线魔方应用,并借助阿里云容器服务成熟的产品生态,实现在线应用的企业级监控,提升应用稳定性。
容器应用与集群管理
欢迎来到《容器应用与集群管理》课程,本课程是“云原生容器Clouder认证“系列中的第二阶段。课程将向您介绍与容器集群相关的概念和技术,这些概念和技术可以帮助您了解阿里云容器服务ACK/ACK Serverless的使用。同时,本课程也会向您介绍可以采取的工具、方法和可操作步骤,以帮助您了解如何基于容器服务ACK Serverless构建和管理企业级应用。 学习完本课程后,您将能够: 掌握容器集群、容器编排的基本概念 掌握Kubernetes的基础概念及核心思想 掌握阿里云容器服务ACK/ACK Serverless概念及使用方法 基于容器服务ACK Serverless搭建和管理企业级网站应用
相关文章
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
成功解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.Check for typos an
|
1月前
error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
error: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
34 0
|
1月前
|
安全 Java 应用服务中间件
A configuration error occurred during startup.Please verify the preference field with the prompt: To
A configuration error occurred during startup.Please verify the preference field with the prompt: To
|
10月前
|
开发工具
WARNING: library configuration mismatch
WARNING: library configuration mismatch
231 0
|
Java 应用服务中间件
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
|
Java Maven
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No valid Maven installation found. Either set the home directory in the configuration dialog or set
588 0
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No matching configuration of project :libusb was found.
No matching configuration of project :libusb was found.
516 0
libvpx enabled but no supported decoders found
libvpx enabled but no supported decoders found
139 0
|
网络协议 关系型数据库 Linux
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
onfigure: error: no acceptable C compiler found in $PATH See `config.log' for more details 问题解决
157 0
|
应用服务中间件 Android开发
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
115 0
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name: