检查

openssl x509 -in /var/lib/rancher/k3s/server/tls.crt -noout -text

修改现有服务

vi /etc/systemd/system/k3s.service
ExecStart=/usr/local/bin/k3s \
    server \
    --tls-san 192.168.1.100 \
    --tls-san mycluster.example.com\

添加ip地址
添加域名

sudo systemctl daemon-reload
sudo systemctl start k3s

安装时

curl -sfL https://get.k3s.io | sh -s - server --tls-san example.com,k3s.example.com

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --tls-san 120.55.103.142" sh -