Skip to content

Commit 3070fff

Browse files
committed
更新OKG
1 parent 161635e commit 3070fff

File tree

4 files changed

+134
-85
lines changed

4 files changed

+134
-85
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- [搞运维](linux/README.md)
55
- [K8s](linux/Kubernetes/README.md)
66
- [权限与用户](linux/Kubernetes/权限与用户.md)
7-
- [OKG(OpenKruiseGame)](linux/Kubernetes/OpenKruiseGame.md)
7+
- [OKG(OpenKruiseGame)](linux/Kubernetes/20251221-OpenKruiseGame.md)
88
- [在k3s中安装cilium并使用eBPF路由](linux/Kubernetes/20251130-在k3s中安装cilium并使用eBPF路由.md)
99
- [Nginx充当镜像源](linux/日常使用/20251027-Nginx充当镜像源.md)
1010
- [解决Wayland下Plasmashell经常卡死的问题](linux/日常使用/20251027-Wayland-Plasmashell-Nvidia.md)
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# OpenKruiseGame配置 <!-- omit in toc -->
2+
3+
> **本文环境:**
4+
> * k8s: v1.32.2-tke.6
5+
> * cert-manager: v1.19.1
6+
> * kruise: v1.8.0
7+
> * kruise-game: 1.0.0
8+
> * tke-extend-network-controller: 2.3.6
9+
---
10+
11+
- [部署](#部署)
12+
- [cert-manager](#cert-manager)
13+
- [Kruise](#kruise)
14+
- [KruiseGame](#kruisegame)
15+
- [tke-extend-network-controller](#tke-extend-network-controller)
16+
- [配置](#配置)
17+
18+
19+
## 部署
20+
### cert-manager
21+
> 它被 tke-extend-network-controller 依赖,因为本文是在腾讯云上实践的
22+
> 如果你用不上,那也不需要装这个
23+
1. 添加仓库
24+
`helm repo add jetstack https://charts.jetstack.io`
25+
2. 安装插件
26+
<details><summary><code>cert-manager.yml</code></summary>
27+
28+
```yaml
29+
crds:
30+
enabled: true
31+
prometheus:
32+
enabled: true
33+
# 如果你没有安装 prometheus operator,配置这些 Annotations 就能让其他Prometheus发现它
34+
serviceAnnotations: &monitor
35+
prometheus.io/scrape: "true"
36+
prometheus.io/port: "9402"
37+
webhook:
38+
serviceAnnotations: *monitor
39+
cainjector:
40+
serviceAnnotations: *monitor
41+
```
42+
43+
</details>
44+
45+
```sh
46+
helm install -n cert-manager --create-namespace\
47+
cert-manager jetstack/cert-manager\
48+
--version v1.19.1\
49+
-f cert-manager.yml
50+
```
51+
52+
### Kruise
53+
1. 添加仓库
54+
`helm repo add openkruise https://openkruise.github.io/charts/`
55+
2. 安装插件
56+
`helm install -n default kruise openkruise/kruise --version 1.8.0`
57+
58+
### KruiseGame
59+
1. 添加仓库
60+
`helm repo add openkruise https://openkruise.github.io/charts/`
61+
2. 安装插件
62+
<details><summary><code>kruise-game.yml</code></summary>
63+
64+
```yaml
65+
replicaCount: 2
66+
# 哦谢天谢地。
67+
# 1.0版本终于加入了外部证书的支持,现在可以部署多个副本了
68+
certificates:
69+
autoGenerated: false
70+
certManager:
71+
enabled: true
72+
```
73+
74+
</details>
75+
76+
```sh
77+
helm install kruise-game openkruise/kruise-game\
78+
--version 1.0.0\
79+
-f kruise-game.yml
80+
```
81+
82+
### tke-extend-network-controller
83+
直接在 TKE 应用市场安装,这样最方便
84+
85+
或者也可以自动化安装
86+
1. 添加仓库
87+
`helm repo add tke-extend-network-controller https://tkestack.github.io/tke-extend-network-controller`
88+
2. 安装插件
89+
<details><summary><code>tke-extend-network-controller.yml</code></summary>
90+
91+
```yaml
92+
region: # 地域
93+
vpcID: # vpc
94+
secretID: # 访问密钥
95+
secretKey: # 访问密钥
96+
clusterID: # 集群ID
97+
98+
resources:
99+
requests:
100+
cpu: 10m
101+
memory: 64Mi
102+
limits:
103+
cpu: 250m
104+
memory: 512Mi
105+
106+
affinity:
107+
nodeAffinity:
108+
requiredDuringSchedulingIgnoredDuringExecution:
109+
nodeSelectorTerms:
110+
- matchExpressions:
111+
- key: node.kubernetes.io/instance-type
112+
operator: NotIn
113+
values: [ eklet ]
114+
```
115+
116+
</details>
117+
118+
```sh
119+
helm install kruise-game openkruise/kruise-game\
120+
--version 1.0.0\
121+
-f kruise-game.yml
122+
```
123+
124+
<details><summary>好!</summary>
125+
角色的支持加到TODO了:
126+
127+
[Github/[Question] 有无支持角色的计划?](https://github.com/tkestack/tke-extend-network-controller/issues/3)
128+
</details>
129+
130+
131+
## 配置
132+
参考 [官方文档](https://openkruise.io/zh/kruisegame/user-manuals/deploy-gameservers) 配置GameServerSet

src/linux/Kubernetes/OpenKruiseGame.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/linux/Kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# K8s
22

33
- [权限与用户](权限与用户.md)
4-
- [OKG(OpenKruiseGame)](OpenKruiseGame.md)
4+
- [OKG(OpenKruiseGame)](20251221-OpenKruiseGame.md)
55
- [在k3s中安装cilium并使用eBPF路由](20251130-在k3s中安装cilium并使用eBPF路由.md)

0 commit comments

Comments
 (0)