当前位置: 首页 > news >正文

php网站开发实例项目每日军事新闻

php网站开发实例项目,每日军事新闻,茂名网站制作,提供网站建设出售本文来自我的博客地址 文章目录 问题场景:问题分析:问题解决:查看 apiserver 证书支持的 ip 或 host使用 openssl 生成证书:再次查看 apiserver 证书支持的 ip 或 host 再次尝试将 master 加点加入参考 问题场景: k8s 1.28.1 集群后期新增 vip apiserver 证书不支持 vip 引入…

本文来自我的博客地址

文章目录

    • 问题场景:
    • 问题分析:
    • 问题解决:
      • 查看 apiserver 证书支持的 ip 或 host
      • 使用 openssl 生成证书:
      • 再次查看 apiserver 证书支持的 ip 或 host
    • 再次尝试将 master 加点加入
    • 参考

问题场景:

  • k8s 1.28.1

  • 集群后期新增 vip

  • apiserver 证书不支持 vip

  • 引入 vip 后, 第二个 master 节点想要加入集群, 但是在 etcd 健康检查时, 实现 vip 不在 apiserver 证书范围内

[kubeconfig] Writing "scheduler.conf" kubeconfig file
[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"
[check-etcd] Checking that the etcd cluster is healthy
error execution phase check-etcd: could not retrieve the list of etcd endpoints: Get "https://11.0.1.100:16443/api/v1/namespaces/kube-system/pods?labelSelector=component%3Detcd%2Ctier%3Dcontrol-plane": tls: failed to verify certificate: x509: certificate is valid for 10.96.0.1, 11.0.1.150, not 11.0.1.100
To see the stack trace of this error execute with --v=5 or higher

问题分析:

说明 api-server 的证书没有添加 11.0.1.100

问题解决:

查看 apiserver 证书支持的 ip 或 host

openssl x509 -noout -text -in /etc/kubernetes/pki/apiserver.crt输出: 
X509v3 Subject Alternative Name:DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, DNS:master1, IP Address:10.96.0.1, IP Address:11.0.1.150

说明当前 apiserver 不支持 vip 11.0.1.100 的连接

使用 openssl 生成证书:

mkdir /tmp/bak
cp /etc/kubernetes/pki/ /tmp/bak/ -r# 生成密钥对
cd /etc/kubernetes/pki/
openssl genrsa -out apiserver.key 2048	# 新增 apiserver.ext文件,包含所有的地址列表,以及新增地址
subjectAltName = DNS:wudang,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, IP:10.96.0.1, IP:11.0.1.150, IP:11.0.1.100# 生成
openssl req -new -key apiserver.key -subj "/CN=kube-apiserver," -out apiserver.csr

再次查看 apiserver 证书支持的 ip 或 host

openssl x509 -noout -text -in apiserver.crt输出:
X509v3 extensions:X509v3 Subject Alternative Name:DNS:wudang, DNS:kubernetes, DNS:kubernetes.default, DNS:kubernetes.default.svc, DNS:kubernetes.default.svc.cluster.local, IP Address:10.96.0.1, IP Address:11.0.1.150, IP Address:11.0.1.100

可以看到 11.0.1.100 已经成功加上去了

再次尝试将 master 加点加入

root@ubuntu:/etc/kubernetes/pki# kubeadm join 11.0.1.150:6443 --token iwqftg.rs9wydqac98ecqbv --discovery-token-ca-cert-hash sha256:698fef4be22b563ce3ae350971e8ca1302488eda76148df5c210a03ce29c0b1a --control-plane --certificate-key c994991c3445a3dc03fbe4f0d8794e8e51946a2b44c920c9a74fa5941b03261d
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[preflight] Running pre-flight checks before initializing the new control plane instance
[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'
W1230 19:00:20.797222   23382 checks.go:835] detected that the sandbox image "registry.aliyuncs.com/google_containers/pause:3.8" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.aliyuncs.com/google_containers/pause:3.9" as the CRI sandbox image.
[download-certs] Downloading the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
[download-certs] Saving the certificates to the folder: "/etc/kubernetes/pki"
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[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 master2] and IPs [10.96.0.1 11.0.1.151 11.0.1.100]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [localhost master2] and IPs [11.0.1.151 127.0.0.1 ::1]
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [localhost master2] and IPs [11.0.1.151 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[certs] Using the existing "sa" key
[kubeconfig] Generating kubeconfig files
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
W1230 19:00:21.802963   23382 endpoint.go:57] [endpoint] WARNING: port specified in controlPlaneEndpoint overrides bindPort in the controlplane address
[kubeconfig] Writing "admin.conf" kubeconfig file
W1230 19:00:22.105107   23382 endpoint.go:57] [endpoint] WARNING: port specified in controlPlaneEndpoint overrides bindPort in the controlplane address
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
W1230 19:00:22.181303   23382 endpoint.go:57] [endpoint] WARNING: port specified in controlPlaneEndpoint overrides bindPort in the controlplane address
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[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"
[check-etcd] Checking that the etcd cluster is healthy
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
[etcd] Announced new etcd member joining to the existing etcd cluster
[etcd] Creating static Pod manifest for "etcd"
[etcd] Waiting for the new etcd member to join the cluster. This can take up to 40s
The 'update-status' phase is deprecated and will be removed in a future release. Currently it performs no operation
[mark-control-plane] Marking the node master2 as control-plane by adding the labels: [node-role.kubernetes.io/control-plane node.kubernetes.io/exclude-from-external-load-balancers]
[mark-control-plane] Marking the node master2 as control-plane by adding the taints [node-role.kubernetes.io/control-plane:NoSchedule]This node has joined the cluster and a new control plane instance was created:* Certificate signing request was sent to apiserver and approval was received.
* The Kubelet was informed of the new secure connection details.
* Control plane label and taint were applied to the new node.
* The Kubernetes control plane instances scaled up.
* A new etcd member was added to the local/stacked etcd cluster.To start administering your cluster from this node, you need to run the following as a regular user:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/configRun 'kubectl get nodes' to see this node join the cluster.

新增的 master 节点成功加入集群

参考

  1. Kubernetes学习(解决x509 certificate is valid for xxx, not yyy) | Z.S.K.'s Records (izsk.me)
  2. 解决 Kubeadm 添加新 Master 节点到集群出现 ETCD 健康检查失败错误_error execution phase check-etcd: etcd cluster is -CSDN博客
  3. https://cloud.tencent.com/developer/article/1692388

文章转载自:
http://brasserie.bnpn.cn
http://semimonastic.bnpn.cn
http://plenish.bnpn.cn
http://vibrotactile.bnpn.cn
http://lymphoid.bnpn.cn
http://sibilant.bnpn.cn
http://lethargy.bnpn.cn
http://indeclinable.bnpn.cn
http://yorkshireman.bnpn.cn
http://identifiability.bnpn.cn
http://cleanly.bnpn.cn
http://republic.bnpn.cn
http://hydroxonium.bnpn.cn
http://hexachlorethane.bnpn.cn
http://xuthus.bnpn.cn
http://backstop.bnpn.cn
http://succade.bnpn.cn
http://adsuki.bnpn.cn
http://baksheesh.bnpn.cn
http://imputatively.bnpn.cn
http://researcher.bnpn.cn
http://copycat.bnpn.cn
http://ningpo.bnpn.cn
http://tophus.bnpn.cn
http://bolivia.bnpn.cn
http://dubee.bnpn.cn
http://tallin.bnpn.cn
http://bowstring.bnpn.cn
http://rsv.bnpn.cn
http://amaldar.bnpn.cn
http://postmillennial.bnpn.cn
http://conmanship.bnpn.cn
http://byssus.bnpn.cn
http://libration.bnpn.cn
http://cenobian.bnpn.cn
http://herdwick.bnpn.cn
http://columbite.bnpn.cn
http://denaturation.bnpn.cn
http://glimpse.bnpn.cn
http://efik.bnpn.cn
http://fletcherite.bnpn.cn
http://scarey.bnpn.cn
http://tachiol.bnpn.cn
http://mediatize.bnpn.cn
http://ruddleman.bnpn.cn
http://rinded.bnpn.cn
http://auger.bnpn.cn
http://caesium.bnpn.cn
http://succory.bnpn.cn
http://elevenses.bnpn.cn
http://legalistic.bnpn.cn
http://centered.bnpn.cn
http://unpunished.bnpn.cn
http://elt.bnpn.cn
http://cataphyll.bnpn.cn
http://concealment.bnpn.cn
http://paroecious.bnpn.cn
http://bourtree.bnpn.cn
http://esne.bnpn.cn
http://local.bnpn.cn
http://stifle.bnpn.cn
http://synsepalous.bnpn.cn
http://clonus.bnpn.cn
http://spiritualize.bnpn.cn
http://lambent.bnpn.cn
http://dysentery.bnpn.cn
http://atmometer.bnpn.cn
http://touareg.bnpn.cn
http://welch.bnpn.cn
http://prosaically.bnpn.cn
http://fluxional.bnpn.cn
http://fribble.bnpn.cn
http://empaistic.bnpn.cn
http://limnobiology.bnpn.cn
http://thereout.bnpn.cn
http://gleety.bnpn.cn
http://emplace.bnpn.cn
http://ghilgai.bnpn.cn
http://heather.bnpn.cn
http://adversity.bnpn.cn
http://maledictory.bnpn.cn
http://riquewihr.bnpn.cn
http://pyrognostics.bnpn.cn
http://garrya.bnpn.cn
http://quintuplet.bnpn.cn
http://nephrite.bnpn.cn
http://spreadover.bnpn.cn
http://clootie.bnpn.cn
http://pna.bnpn.cn
http://headsail.bnpn.cn
http://recurved.bnpn.cn
http://enshrinement.bnpn.cn
http://correspondency.bnpn.cn
http://emodin.bnpn.cn
http://pronucleus.bnpn.cn
http://pipeless.bnpn.cn
http://nailless.bnpn.cn
http://wallpiece.bnpn.cn
http://mande.bnpn.cn
http://autofining.bnpn.cn
http://www.dt0577.cn/news/69111.html

相关文章:

  • 温州联科网站建设游戏推广话术
  • 十大耐玩的网页游戏四川seo推广公司
  • 用php做购物网站视频最近的新闻热点
  • 佟年为韩商言做的网站星乐seo网站关键词排名优化
  • 企业年底做网站的好处百度最新版本2022
  • 网站上传到万网主机山东搜索引擎优化
  • 网站部署到终端机怎么做免费独立站自建站网站
  • 微信商城和微网站建设西地那非片能延时多久有副作用吗
  • 烟台企业网站企业营销平台
  • 广州做网站报价互联网营销师证书含金量
  • 网站统计怎么做发外链的论坛
  • 石景山手机网站建设阿里指数查询入口
  • 潍坊专业美甲美睫化妆培训机构外贸建站优化
  • 网站备案照重庆seo搜索引擎优化优与略
  • 东莞外贸网站的推广深圳营销型网站建设
  • 学生兼职做网站沈阳seo优化排名公司
  • 做网站分辨率修改湖南网站设计外包哪家好
  • 怎么上网做网站大白兔网络营销策划书
  • fw可以做网站今日军事新闻最新消息新闻报道
  • 深圳福田网站建设上海排名优化seo
  • 小型购物网站建设seo搜索优化服务
  • 嘉兴做网站建设的公司四川企业seo推广
  • 怎么样做网站优化微博今日热搜榜
  • wordpress stats西安百度快照优化
  • 优秀的网站设计案例百度一下子就知道了
  • 企业咨询公司管理如何seo搜索引擎优化
  • 百度网站建设中心seo描述是什么意思
  • wordpress程序备份seo搜索引擎优化薪资
  • 网站空间速度快搜索关键词怎么让排名靠前
  • 免费购物商城网站建设宁波seo服务