部署k8s遇到的问题

kubeadm 部署k8s 遇到的问题

  • systemd: kubelet.service failed(需要关闭交换分区,查看系统日志)
  • Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of “crypto/rsa: verification error” while trying to verify candidate authority certificate “kubernetes”)(kubeadm reset 未将之前节点清除干净,需手动清理)
  • error: unable to recognize “calico.yaml”: no matches for kind “PodDisruptionBudget” in version “policy/v1”(calico的版本和k8s的版本不相符,查看calico官网中推荐的版本再做尝试)
  • Back-off restarting failed container
  • invalid argument “{{ metrics_server_min_cluster_size }}” for “–minClusterSize” flag: strconv.ParseUint: parsing “{{ metrics_server_min_cluster_size }}”: invalid syntax(注释metrics-server-deployment.yaml中command的部分参数)
  • error: metrics not available yet(检查metric-server-deployment.yaml中定义的配置以及响应pod的日志)

二进制部署k8s遇到的问题

  • K8S生成etcd证书时报错 “code“:5200,“message“:“could not read configuration file“
  • This certificate lacks a “hosts” field. This makes it unsuitable for websites(可以忽略)
  • rejected connection from “10.11.129.12:57508” (error “remote error: tls: bad certificate”, ServerName “”)
  • etcd: error verifying flags, error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go struct field configYAML.log-output of type []string. See ‘etcd --help’
  • Keepalived_vrrp[10239]: (VI_1): received an invalid passwd! (主要是keepalived的配置问题-vrrp strict)
  • kube-apiserver: I0116 23:18:36.063581 9837 controlbuf.go:508] transport: loopyWriter.run returning. connection error: desc = “transport is closing” (kube-apiserver的日志,关闭链接,可忽略)
  • error retrieving resource lock kube-system/kube-controller-manager: the server rejected our request for an unknown reason (get endpoints kube-controller-manager)
  • kube-scheduler[1052]: invalid configuration: [unable to read client-cert /etc/kubernetes/pki/client.crt
  • kube-scheduler no configuration has been provided, try setting KUBERNETES_MASTER environment(执行kubectl的时候报错,未找到admin.kubeconfig文件)
  • failed to run Kubelet: misconfiguration: kubelet cgroup driver: “systemd“ is different from docker(修改kubelet-conf.yaml中指定的cgroupdriver)
  • failed to retrieve nvidia-container-runtime version docker(distribution=$(. /etc/os-release;echo I D ID IDVERSION_ID)
    curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.repo | sudo tee /etc/yum.repos.d/nvidia-container-runtime.repo\yum install nvidia-container-runtime -y)
  • kubelet.go:2183] node “master02” not found (查看磁盘空间)

你可能感兴趣的:(浅谈k8s技术,kubernetes)