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

简介: 解决CentOS部署K3S环境8080端口异常

解决CentOS部署K3S环境8080端口异常

首先运行起来systemctl start k3s.service 不然不存在/etc/rancher/k3s/k3s.yaml
运行起来后编辑文件设置
     vim /etc/profile
     在底部增加新的环境变量 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
     或者是
     echo "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> /etc/profile
使生效
  source /etc/profile

相关文章
|
Kubernetes 网络协议 数据安全/隐私保护
WireGuard 系列文章(八):基于 WireGuard 的 K8S CNI Kilo 简介
WireGuard 系列文章(八):基于 WireGuard 的 K8S CNI Kilo 简介
|
fastjson
fastjson设置指定日期属性的格式化
fastjson默认将时间格式化为时间戳,如果我们想以时间字符串格式输出的话,暂提供两种方式 1.序列化器方式 声明DateJsonSerializer public class DateJsonSerializer implements Object...
7739 1
|
应用服务中间件 网络架构 Docker
|
Docker 容器
Docker服务启动失败报错:Job for docker.service failed because the control process exited with error code.
Docker服务启动失败报错:Job for docker.service failed because the control process exited with error code.
9156 1
|
Kubernetes 容器
Kubernetes附加组件Dashboard部署实战篇
关于如何在Kubernetes集群中部署和配置Dashboard组件的详细实战指南,涵盖了从创建证书、部署Dashboard、设置服务访问到登录认证的完整流程。
1987 0
Kubernetes附加组件Dashboard部署实战篇
|
存储 自然语言处理 Go
|
存储 分布式计算 算法
恭喜小红书!业界最大数据湖0故障迁上阿里云
恭喜小红书!业界最大数据湖0故障迁上阿里云
1586 1
|
弹性计算 Kubernetes Perl
k8s 设置pod 的cpu 和内存
在 Kubernetes (k8s) 中,设置 Pod 的 CPU 和内存资源限制和请求是非常重要的,因为这有助于确保集群资源的合理分配和有效利用。你可以通过定义 Pod 的 `resources` 字段来设置这些限制。 以下是一个示例 YAML 文件,展示了如何为一个 Pod 设置 CPU 和内存资源请求(requests)和限制(limits): ```yaml apiVersion: v1 kind: Pod metadata: name: example-pod spec: containers: - name: example-container image:
2177 3
|
存储 Kubernetes Ubuntu
Ubuntu 22.04LTS版本二进制部署K8S 1.30+版本
这篇文章详细介绍了在Ubuntu 22.04 LTS系统上使用VMware Fusion虚拟化软件部署Kubernetes 1.30+版本的完整过程,包括环境准备、安装containerd、配置etcd、生成证书、部署高可用组件、启动Kubernetes核心组件以及网络插件的部署和故障排查。
1865 5
|
Kubernetes 关系型数据库 MySQL
k8s学习--利用helm部署应用mysql,加深helm的理解
k8s学习--利用helm部署应用mysql,加深helm的理解
1646 0