Skip to content

Commit 9280cb7

Browse files
authored
Merge pull request #1545 from kinarashah/azdocs2
update correct location for azure's cloud controller manager manifest
2 parents b00f9ba + 2eb6c8b commit 9280cb7

File tree

8 files changed

+2034
-500
lines changed
  • docs/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
  • i18n/zh/docusaurus-plugin-content-docs
    • current/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
    • version-2.10/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
    • version-2.11/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
    • version-2.9/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
  • versioned_docs
    • version-2.10/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
    • version-2.11/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers
    • version-2.9/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers

8 files changed

+2034
-500
lines changed

Diff for: docs/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/azure.md

+73-125
Original file line numberDiff line numberDiff line change
@@ -175,34 +175,6 @@ stringData:
175175
"loadBalancerSku": "standard",
176176
"excludeMasterFromStandardLB": false,
177177
}
178-
---
179-
apiVersion: rbac.authorization.k8s.io/v1beta1
180-
kind: ClusterRole
181-
metadata:
182-
labels:
183-
kubernetes.io/cluster-service: "true"
184-
name: system:azure-cloud-provider-secret-getter
185-
rules:
186-
- apiGroups: [""]
187-
resources: ["secrets"]
188-
resourceNames: ["azure-cloud-config"]
189-
verbs:
190-
- get
191-
---
192-
apiVersion: rbac.authorization.k8s.io/v1beta1
193-
kind: ClusterRoleBinding
194-
metadata:
195-
labels:
196-
kubernetes.io/cluster-service: "true"
197-
name: system:azure-cloud-provider-secret-getter
198-
roleRef:
199-
apiGroup: rbac.authorization.k8s.io
200-
kind: ClusterRole
201-
name: system:azure-cloud-provider-secret-getter
202-
subjects:
203-
- kind: ServiceAccount
204-
name: azure-cloud-config
205-
namespace: kube-system
206178
```
207179

208180
## Using the Out-of-tree Azure Cloud Provider
@@ -212,109 +184,85 @@ roleRef:
212184

213185
1. Select **External** from the **Cloud Provider** drop-down in the **Cluster Configuration** section.
214186

215-
2. Prepare the Cloud Provider Configuration to set it in the next step. Note that Rancher automatically creates a new Network Security Group, Resource Group, Availability Set, Subnet, and Virtual Network. If you already have some or all of these created, you must specify them before creating the cluster.
216-
- Click **Show Advanced** to view or edit these automatically generated names. Your Cloud Provider Configuration **must** match the fields in the **Machine Pools** section. If you have multiple pools, they must all use the same Resource Group, Availability Set, Subnet, Virtual Network, and Network Security Group.
187+
2. Under **Cluster Configuration > Advanced**, click **Add** under **Additional Controller Manager Args** and add this flag: `--configure-cloud-routes=false`.
217188

218-
3. Under **Cluster Configuration > Advanced**, click **Add** under **Additional Controller Manager Args** and add this flag: `--configure-cloud-routes=false`.
189+
3. Prepare the Cloud Provider Configuration to set it in the next step. Note that Rancher automatically creates a new Network Security Group, Resource Group, Availability Set, Subnet, and Virtual Network. If you already have some or all of these created, you must specify them before creating the cluster.
219190

220-
Note that the chart reads the Cloud Provider Config from the secret in the `kube-system` namespace. An example secret for the Cloud Provider Config is shown below. Modify it as needed. Refer to the full list of configuration options in the [upstream docs](https://cloud-provider-azure.sigs.k8s.io/install/configs/).
191+
Click **Show Advanced** to view or edit these automatically generated names. Your Cloud Provider Configuration **must** match the fields in the **Machine Pools** section. If you have multiple pools, they must all use the same Resource Group, Availability Set, Subnet, Virtual Network, and Network Security Group.
221192

222-
```yaml
223-
apiVersion: helm.cattle.io/v1
224-
kind: HelmChart
225-
metadata:
226-
name: azure-cloud-controller-manager
227-
namespace: kube-system
228-
spec:
229-
chart: cloud-provider-azure
230-
repo: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
231-
targetNamespace: kube-system
232-
bootstrap: true
233-
valuesContent: |-
234-
infra:
235-
clusterName: <cluster-name>
236-
cloudControllerManager:
237-
cloudConfigSecretName: azure-cloud-config
238-
cloudConfig: null
239-
clusterCIDR: null
240-
enableDynamicReloading: 'true'
241-
nodeSelector:
242-
node-role.kubernetes.io/control-plane: 'true'
243-
allocateNodeCidrs: 'false'
244-
hostNetworking: true
245-
caCertDir: /etc/ssl
246-
configureCloudRoutes: 'false'
247-
enabled: true
248-
tolerations:
249-
- effect: NoSchedule
250-
key: node-role.kubernetes.io/master
251-
- effect: NoSchedule
252-
key: node-role.kubernetes.io/control-plane
253-
value: 'true'
254-
- effect: NoSchedule
255-
key: node.cloudprovider.kubernetes.io/uninitialized
256-
value: 'true'
257-
---
258-
apiVersion: v1
259-
kind: Secret
260-
metadata:
261-
name: azure-cloud-config
262-
namespace: kube-system
263-
type: Opaque
264-
stringData:
265-
cloud-config: |-
266-
{
267-
"cloud": "AzurePublicCloud",
268-
"tenantId": "<tenant-id>",
269-
"subscriptionId": "<subscription-id>",
270-
"aadClientId": "<client-id>",
271-
"aadClientSecret": "<tenant-id>",
272-
"resourceGroup": "docker-machine",
273-
"location": "westus",
274-
"subnetName": "docker-machine",
275-
"securityGroupName": "rancher-managed-kqmtsjgJ",
276-
"securityGroupResourceGroup": "docker-machine",
277-
"vnetName": "docker-machine-vnet",
278-
"vnetResourceGroup": "docker-machine",
279-
"primaryAvailabilitySetName": "docker-machine",
280-
"routeTableResourceGroup": "docker-machine",
281-
"cloudProviderBackoff": false,
282-
"useManagedIdentityExtension": false,
283-
"useInstanceMetadata": true,
284-
"loadBalancerSku": "standard",
285-
"excludeMasterFromStandardLB": false,
286-
}
287-
---
288-
apiVersion: rbac.authorization.k8s.io/v1beta1
289-
kind: ClusterRole
290-
metadata:
291-
labels:
292-
kubernetes.io/cluster-service: "true"
293-
name: system:azure-cloud-provider-secret-getter
294-
rules:
295-
- apiGroups: [""]
296-
resources: ["secrets"]
297-
resourceNames: ["azure-cloud-config"]
298-
verbs:
299-
- get
300-
---
301-
apiVersion: rbac.authorization.k8s.io/v1beta1
302-
kind: ClusterRoleBinding
303-
metadata:
304-
labels:
305-
kubernetes.io/cluster-service: "true"
306-
name: system:azure-cloud-provider-secret-getter
307-
roleRef:
308-
apiGroup: rbac.authorization.k8s.io
309-
kind: ClusterRole
310-
name: system:azure-cloud-provider-secret-getter
311-
subjects:
312-
- kind: ServiceAccount
193+
4. Under **Cluster Configuration > Add-on Config**, add the cloud controller manager manifest shown below into **Additional Manifest**.
194+
Note that this chart reads the Cloud Provider Config from the secret in the `kube-system` namespace. An example secret for the Cloud Provider Config is shown below; modify it as needed. Refer to the full list of configuration options in the [upstream docs](https://cloud-provider-azure.sigs.k8s.io/install/configs/).
195+
196+
Alternatively, you can also install the cloud controller manager using the [Helm CLI](#helm-chart-installation-from-cli).
197+
198+
```yaml
199+
apiVersion: helm.cattle.io/v1
200+
kind: HelmChart
201+
metadata:
202+
name: azure-cloud-controller-manager
203+
namespace: kube-system
204+
spec:
205+
chart: cloud-provider-azure
206+
repo: https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo
207+
targetNamespace: kube-system
208+
bootstrap: true
209+
valuesContent: |-
210+
infra:
211+
clusterName: <cluster-name>
212+
cloudControllerManager:
213+
cloudConfigSecretName: azure-cloud-config
214+
cloudConfig: null
215+
clusterCIDR: null
216+
enableDynamicReloading: 'true'
217+
nodeSelector:
218+
node-role.kubernetes.io/control-plane: 'true'
219+
allocateNodeCidrs: 'false'
220+
hostNetworking: true
221+
caCertDir: /etc/ssl
222+
configureCloudRoutes: 'false'
223+
enabled: true
224+
tolerations:
225+
- effect: NoSchedule
226+
key: node-role.kubernetes.io/master
227+
- effect: NoSchedule
228+
key: node-role.kubernetes.io/control-plane
229+
value: 'true'
230+
- effect: NoSchedule
231+
key: node.cloudprovider.kubernetes.io/uninitialized
232+
value: 'true'
233+
---
234+
apiVersion: v1
235+
kind: Secret
236+
metadata:
313237
name: azure-cloud-config
314238
namespace: kube-system
315-
```
239+
type: Opaque
240+
stringData:
241+
cloud-config: |-
242+
{
243+
"cloud": "AzurePublicCloud",
244+
"tenantId": "<tenant-id>",
245+
"subscriptionId": "<subscription-id>",
246+
"aadClientId": "<client-id>",
247+
"aadClientSecret": "<tenant-id>",
248+
"resourceGroup": "docker-machine",
249+
"location": "westus",
250+
"subnetName": "docker-machine",
251+
"securityGroupName": "rancher-managed-kqmtsjgJ",
252+
"securityGroupResourceGroup": "docker-machine",
253+
"vnetName": "docker-machine-vnet",
254+
"vnetResourceGroup": "docker-machine",
255+
"primaryAvailabilitySetName": "docker-machine",
256+
"routeTableResourceGroup": "docker-machine",
257+
"cloudProviderBackoff": false,
258+
"useManagedIdentityExtension": false,
259+
"useInstanceMetadata": true,
260+
"loadBalancerSku": "standard",
261+
"excludeMasterFromStandardLB": false,
262+
}
263+
```
316264

317-
4. Click **Create** to submit the form and create the cluster.
265+
5. Click **Create** to submit the form and create the cluster.
318266

319267
</TabItem>
320268

0 commit comments

Comments
 (0)