目录

 

1.什么是YAML文件

2.systemctl

3.安装时候查看失败的镜像

4.SELINUX值为disabled

5.初始化kubeadm端口被占用-使用kubeadm reset重置

6.echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile解决8080端口被拒绝

7.主节点启动成功

8.Node节点加入集群成功

9.查看集群中拥有的节点

11.不能建立SSL连接

12.小工具lrzsz

13.kubectl apply -f kube-flannel.yml

14.kube-flannel镜像拉取失败的问题

15.kubectl是go语言写的


1.什么是YAML文件

什么是YAML文件

2.systemctl

systemctl

3.安装时候查看失败的镜像

 

4.SELINUX值为disabled

kubeadm init错误-阅读链接

5.初始化kubeadm端口被占用-使用kubeadm reset重置

初始化kubeadm出错-端口被占用的错误

6.echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile解决8080端口被拒绝

The connection to the server localhost:8080 was refused - did you specify the right host or port?解决--对我的情况来说是有效的,我在用kubectl get nodes查看的时候报了这个错

echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> /etc/profile

7.主节点启动成功

[root@master muten]# kubeadm init --apiserver-advertise-address=192.168.244.139 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.19.6 --service-cidr=10.96.0.0/12 --pod-network-cidr=10.244.0.0/16
W0209 18:07:22.511138   21320 configset.go:348] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[init] Using Kubernetes version: v1.19.6
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local master] and IPs [10.96.0.1 192.168.244.139]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [localhost master] and IPs [192.168.244.139 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [localhost master] and IPs [192.168.244.139 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 5.502379 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.19" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node master as control-plane by adding the label "node-role.kubernetes.io/master=''"
[mark-control-plane] Marking the node master as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: ribaxq.5em1azk4rbyp556k
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.244.139:6443 --token ribaxq.5em1azk4rbyp556k \
    --discovery-token-ca-cert-hash sha256:b4ec8b44e81cc9c35d34c327095fb37c793537b25c396f492c83a8af46a5a22d 

8.Node节点加入集群成功

9.查看集群中拥有的节点

10.关于raw.githubusercontent.com无法连接的问题

关于raw.githubusercontent.com无法连接的问题

 

11.不能建立SSL连接

Unable to establish SSL connection

 

12.小工具lrzsz

lrzsz是什么?

13.kubectl apply -f kube-flannel.yml

 

14.kube-flannel镜像拉取失败的问题

Kubernetes Pod 提示: Init:ImagePullBackOff

另一个链接

15.kubectl是go语言写的

一个源码链接

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐