Dream Dream
首页
  • Kubernetes
  • Docker
  • Oracle
  • Vue
  • Java
  • SpringBoot
更多
心灵鸡汤

Dream

啥也不知道
首页
  • Kubernetes
  • Docker
  • Oracle
  • Vue
  • Java
  • SpringBoot
更多
心灵鸡汤
  • kubernetes

    • k8s问题记录
      • error: You must be logged in to the server (the server has asked for the client to provide credentials)
      • network is not ready: container runtime network not ready: NetworkRedy=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized
      • The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get “http://localhost:10248/healthz”: dial tcp [::1]:10248: connect: connection refused.
    • k8s常用命令
    • k8s证书相关
    • 升级 kubeadm 集群
    • lens
    • 知识记录
    • k8s-pod安装工具
    • k8s给pod添加hosts
    • k8s下微服务的优雅滚动升级
    • k8s-dashboard
    • kubernetes之部署nginx+vue前端
  • docker

  • jenkins

  • git

  • linux

  • 服务器
  • kubernetes
Dream
2023-05-06

k8s问题记录

# error: You must be logged in to the server (the server has asked for the client to provide credentials)

解决:
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
注意:
    不能使用:
        echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bash_profile
        source  ~/.bash_profile
    否则 ssh 远程 执行会有问题
1
2
3
4
5
6
7
8

# network is not ready: container runtime network not ready: NetworkRedy=false reason:NetworkPluginNotReady message:Network plugin returns error: cni plugin not initialized


1

# The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get “http://localhost:10248/healthz”: dial tcp [::1]:10248: connect: connection refused.

## 交换分区开着导致 k8s 不能进行初始化

#查看现有的交换分区
root@master1:~# swapon -s
Filename				Type		Size	Used	Priority
/dev/sda2                              	partition	3906556	1036	-2

#关闭所有的交换分区
root@master1:~# swapoff -a

#再次查看  已经没有打开的交换分区了
root@master1:~# swapon -s
1
2
3
4
5
6
7
8
9
10
11
12
k8s常用命令

k8s常用命令→

最近更新
01
问题记录2
02-01
02
硬盘格式化
01-10
03
问题记录
01-03
更多文章>
Copyright © 2020-2025 Dream hu | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式