|
1 |
| -# This is an example of how to setup cloud-controller-manager as a Daemonset in your cluster. |
2 |
| -# It assumes that your masters can run pods and has the role node-role.kubernetes.io/master |
3 |
| -# Note that this Daemonset will not work straight out of the box for your cloud, this is |
4 |
| -# meant to be a guideline. |
| 1 | +# 这是一个如何将 cloud-controller-manager 安装为集群中的 Daemonset 的示例。 |
| 2 | +# 本例假定你的主控节点可以运行 pod 并具有角色 node-role.kubernetes.io/master |
| 3 | +# 请注意,这里的 Daemonset 不能直接在你的云上工作,此例只是一个指导。 |
5 | 4 |
|
6 | 5 | ---
|
7 | 6 | apiVersion: v1
|
@@ -42,28 +41,32 @@ spec:
|
42 | 41 | serviceAccountName: cloud-controller-manager
|
43 | 42 | containers:
|
44 | 43 | - name: cloud-controller-manager
|
45 |
| - # for in-tree providers we use k8s.gcr.io/cloud-controller-manager |
46 |
| - # this can be replaced with any other image for out-of-tree providers |
| 44 | + # 对于树内驱动,我们使用 k8s.gcr.io/cloud-controller-manager, |
| 45 | + # 镜像可以替换为其他树外驱动的镜像 |
47 | 46 | image: k8s.gcr.io/cloud-controller-manager:v1.8.0
|
48 | 47 | command:
|
49 | 48 | - /usr/local/bin/cloud-controller-manager
|
50 |
| - - --cloud-provider=[YOUR_CLOUD_PROVIDER] # Add your own cloud provider here! |
| 49 | + - --cloud-provider=[YOUR_CLOUD_PROVIDER] # 在此处添加你自己的云驱动! |
51 | 50 | - --leader-elect=true
|
52 | 51 | - --use-service-account-credentials
|
53 |
| - # these flags will vary for every cloud provider |
| 52 | + # 这些标志因每个云驱动而异 |
54 | 53 | - --allocate-node-cidrs=true
|
55 | 54 | - --configure-cloud-routes=true
|
56 | 55 | - --cluster-cidr=172.17.0.0/16
|
57 | 56 | tolerations:
|
58 |
| - # this is required so CCM can bootstrap itself |
| 57 | + # 这一设置是必需的,为了让 CCM 可以自行引导 |
59 | 58 | - key: node.cloudprovider.kubernetes.io/uninitialized
|
60 | 59 | value: "true"
|
61 | 60 | effect: NoSchedule
|
62 |
| - # this is to have the daemonset runnable on master nodes |
63 |
| - # the taint may vary depending on your cluster setup |
| 61 | + # 这些容忍度使得守护进程能够在控制平面节点上运行 |
| 62 | + # 如果你的控制平面节点不应该运行 pod,请删除它们 |
| 63 | + - key: node-role.kubernetes.io/control-plane |
| 64 | + operator: Exists |
| 65 | + effect: NoSchedule |
64 | 66 | - key: node-role.kubernetes.io/master
|
| 67 | + operator: Exists |
65 | 68 | effect: NoSchedule
|
66 |
| - # this is to restrict CCM to only run on master nodes |
67 |
| - # the node selector may vary depending on your cluster setup |
| 69 | + # 这是为了限制 CCM 仅在主节点上运行 |
| 70 | + # 节点选择器可能因你的集群设置而异 |
68 | 71 | nodeSelector:
|
69 | 72 | node-role.kubernetes.io/master: ""
|
0 commit comments