將備用 IP 地址添加到 kubernetes api 服務器 (add alternative IP address to kubernetes api server)


問題描述

將備用 IP 地址添加到 kubernetes api 服務器 (add alternative IP address to kubernetes api server)

我正在嘗試連接到由 kubeadm 在 AWS lightail 實例(主節點和 2 個工作節點)上部署的 kubernetes 集群。我將 .kube/config 文件複製到本地計算機並將 server: https://172.26.2.101:6443 替換為 server: https://:6443 並嘗試連接。但出現以下錯誤

Unable to connect to the server: x509: certificate is valid for 10.96.0.1, 172.26.2.101, not <public_ip_address>

任何想法?!

謝謝,


參考解法

方法 1:

I've found the solution below,

remove current apiserver certificates

sudo rm /etc/kubernetes/pki/apiserver.*

generate new certificates adding the public ip

sudo kubeadm init phase certs apiserver ‑‑apiserver‑cert‑extra‑sans=<public_ip>

(by NurhunNurhun)

參考文件

  1. add alternative IP address to kubernetes api server (CC BY‑SA 2.5/3.0/4.0)

#tls1.2 #Kubernetes #certificate






相關問題

如何使用 Retrofit 添加 TLS v 1.0 和 TLS v.1.1 (How to add TLS v 1.0 and TLS v.1.1 with Retrofit)

我的 openssl 和 ssl 默認 CA 證書路徑是什麼? (what is my openssl and ssl Default CA Certs Path?)

LDAP 使用端口 389 失敗 (LDAP fails using port 389)

如何配置 Apache 以接受具有 TLS v1.2 的過期客戶端證書? (How configure Apache to accept expired client certificate with TLS v1.2?)

Docker - 將 localhost HTTPS 服務器從容器發佈到主機 (Docker - Publish localhost HTTPS server from container to host)

SChannel 中的密碼套件選擇 (Cipher suite selection in SChannel)

我可以使用任何客戶端證書連接到在容器中運行的 MQTT 代理 (I'm able to connect to MQTT broker running in a container with any client certificate)

如何為通過 Kestrel 服務器託管 PWA 的 UWP 桌面橋應用配置 https (How to configure https for a UWP Desktop Bridge app hosting a PWA via a Kestrel Server)

如何修復 ERR_SSL_VERSION_OR_CIPHER_MISMATCH 錯誤? (How to fix ERR_SSL_VERSION_OR_CIPHER_MISMATCH error?)

在 Apache 2.4.37 中禁用 TLS 1.0 和 1.1 不起作用 (Disabling TLS 1.0 & 1.1 in Apache 2.4.37 not working)

如何從 Windows 解密其他設備(Wifi 熱點)的 TLS 數據包? (How can I decrypt TLS packets of other devices (Wifi Hotspot) from Windows?)

將備用 IP 地址添加到 kubernetes api 服務器 (add alternative IP address to kubernetes api server)







留言討論