Files
k8s-docs/k8s/xiongxiao.me/docs/09-ipv6-dualstack.md
2025-11-27 01:35:58 +08:00

43 lines
884 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "K8s 升级为 IPv4/IPv6 双栈配置"
description: "详细介绍如何将 K3s 集群从单栈 IPv4 升级为 IPv4/IPv6 双栈模式包括系统准备、K3s 配置修改、服务验证和常见问题排查。"
tags: ["k8s", "k3s", "ipv6", "dual-stack", "network", "upgrade"]
createdAt: "2025-11-26"
---
# K8s 升级为 IPv4/IPv6 双栈配置
本文档介绍如何将 K3s 集群升级为支持 IPv4/IPv6 双栈网络。
## 前置条件检查
### 1. SSH 连接到远程服务器
```sh
# 连接到主节点
ssh user@your-master-node
# 或使用别名(如果已配置)
ssh light
```
默认配置
```yaml
tls-san:
- "rancher.xiongxiao.me" # 你的域名
- "121.4.112.18" # 你的公网 IP
```
systemctl restart k3s
```sh
vim /etc/systemd/system/k3s.service
sudo systemctl daemon-reload
sudo systemctl start k3s
kubectl get nodes -o wide
```