You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/getting-started/installation/register-a-cluster.md
+119Lines changed: 119 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,47 @@ up the external client.
82
82
{{% /tab %}}
83
83
{{< /tabpane >}}
84
84
85
+
### Configure CPU and memory resources
86
+
87
+
You can configure CPU and memory resources for the klusterlet agent components by adding resource flags to the `clusteradm join` command. These flags indicate that all components in the klusterlet agent will use the same resource requirement or limit:
88
+
89
+
{{< tabpane text=true >}}
90
+
{{% tab header="kind" %}}
91
+
```shell
92
+
# Configure resource requests and limits for klusterlet components
93
+
clusteradm join \
94
+
--hub-token <your token data> \
95
+
--hub-apiserver <your hub cluster endpoint> \
96
+
--wait \
97
+
--cluster-name "cluster1" \
98
+
--resource-qos-class ResourceRequirement \
99
+
--resource-limits cpu=800m,memory=800Mi \
100
+
--resource-requests cpu=400m,memory=400Mi \
101
+
--force-internal-endpoint-lookup \
102
+
--context ${CTX_MANAGED_CLUSTER}
103
+
```
104
+
{{% /tab %}}
105
+
{{% tab header="k3s, openshift 4.X" %}}
106
+
```shell
107
+
# Configure resource requests and limits for klusterlet components
108
+
clusteradm join \
109
+
--hub-token <your token data> \
110
+
--hub-apiserver <your hub cluster endpoint> \
111
+
--wait \
112
+
--cluster-name "cluster1" \
113
+
--resource-qos-class ResourceRequirement \
114
+
--resource-limits cpu=800m,memory=800Mi \
115
+
--resource-requests cpu=400m,memory=400Mi \
116
+
--context ${CTX_MANAGED_CLUSTER}
117
+
```
118
+
{{% /tab %}}
119
+
{{< /tabpane >}}
120
+
121
+
Available resource configuration flags:
122
+
-`--resource-qos-class`: Sets the resource QoS class (`Default`, `BestEffort`, or `ResourceRequirement`)
123
+
-`--resource-limits`: Specifies resource limits as key-value pairs (e.g., `cpu=800m,memory=800Mi`)
124
+
-`--resource-requests`: Specifies resource requests as key-value pairs (e.g., `cpu=500m,memory=500Mi`)
125
+
85
126
### Bootstrap a klusterlet in hosted mode(Optional)
86
127
87
128
Using the above command, the klusterlet components(registration-agent and work-agent) will be deployed on the managed
@@ -127,6 +168,46 @@ to the hosting cluster to register the managed cluster to the hub.
127
168
{{% /tab %}}
128
169
{{< /tabpane >}}
129
170
171
+
**Resource configuration in hosted mode:**
172
+
173
+
You can also configure CPU and memory resources when using hosted mode by adding the same resource flags:
174
+
175
+
{{< tabpane text=true >}}
176
+
{{% tab header="kind" %}}
177
+
```shell
178
+
# Configure resource requests and limits for klusterlet components in hosted mode
You can configure CPU and memory resources for the cluster manager components by adding resource flags to the `clusteradm init` command. These flags indicate that all components in the hub controller will use the same resource requirement or limit:
66
+
67
+
```shell
68
+
# Configure resource requests and limits for cluster manager components
69
+
clusteradm init \
70
+
--resource-qos-class ResourceRequirement \
71
+
--resource-limits cpu=1000m,memory=1Gi \
72
+
--resource-requests cpu=500m,memory=512Mi \
73
+
--wait --context ${CTX_HUB_CLUSTER}
74
+
```
75
+
76
+
Available resource configuration flags:
77
+
-`--resource-qos-class`: Sets the resource QoS class (`Default`, `BestEffort`, or `ResourceRequirement`)
78
+
-`--resource-limits`: Specifies resource limits as key-value pairs (e.g., `cpu=800m,memory=800Mi`)
79
+
-`--resource-requests`: Specifies resource requests as key-value pairs (e.g., `cpu=500m,memory=500Mi`)
0 commit comments