Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徐晓伟工作室
gitlab-k8s
提交
62f15e95
G
gitlab-k8s
项目概览
徐晓伟工作室
/
gitlab-k8s
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-k8s
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
62f15e95
编写于
7月 10, 2023
作者:
徐晓伟
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
📝
Kubernetes(k8s)安装:增加注释
上级
e31dbac1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
5 deletion
+19
-5
k8s/centos-install.md
k8s/centos-install.md
+19
-5
未找到文件。
k8s/centos-install.md
浏览文件 @
62f15e95
...
...
@@ -166,7 +166,9 @@
host_path = "/var/run/docker.sock"
```
/etc/containerd/config.toml 中的 SystemdCgroup = true 的优先级高于 /etc/docker/daemon.json 中的 cgroupdriver
/etc/containerd/config.toml
中的
[
SystemdCgroup = true
](
https://kubernetes.io/zh-cn/docs/setup/production-environment/container-runtimes/#containerd-systemd
)
的优先级高于 /etc/docker/daemon.json 中的 cgroupdriver
```shell
# https://docs.docker.com/engine/install/centos/
...
...
@@ -249,6 +251,7 @@
10.
安装 k8s 1.25.3 所需依赖
```shell
# https://kubernetes.io/zh-cn/docs/setup/production-environment/container-runtimes/
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
...
...
@@ -256,15 +259,12 @@
sudo modprobe overlay
sudo modprobe br_netfilter
```
```shell
# 设置所需的 sysctl 参数,参数在重新启动后保持不变
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
# 应用 sysctl 参数而不重新启动
...
...
@@ -272,12 +272,14 @@
```
```shell
# https://kubernetes.io/zh-cn/docs/setup/production-environment/container-runtimes/
# 通过运行以下指令确认 br_netfilter 和 overlay 模块被加载:
lsmod | grep br_netfilter
lsmod | grep overlay
```
```shell
# https://kubernetes.io/zh-cn/docs/setup/production-environment/container-runtimes/
# 通过运行以下指令确认 net.bridge.bridge-nf-call-iptables、net.bridge.bridge-nf-call-ip6tables 和 net.ipv4.ip_forward 系统变量在你的 sysctl 配置中被设置为 1:
sysctl net.bridge.bridge-nf-call-iptables net.bridge.bridge-nf-call-ip6tables net.ipv4.ip_forward
```
...
...
@@ -360,6 +362,18 @@
14.
控制面板:初始化
```shell
# 初始化前:列举所有所需的镜像
# kubeadm config images list
# 初始化前:列举所有所需的镜像,使用阿里云镜像
# kubeadm config images list --image-repository=registry.aliyuncs.com/google_containers
# 初始化前:拉取所有的镜像
# kubeadm config images pull
# 初始化前:拉取所有的镜像,使用阿里云镜像
# kubeadm config images pull --image-repository=registry.aliyuncs.com/google_containers
kubeadm init --image-repository=registry.aliyuncs.com/google_containers
# 指定集群的IP
# kubeadm init --image-repository=registry.aliyuncs.com/google_containers --apiserver-advertise-address=192.168.80.60
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录