Skip to content

Commit

Permalink
Merge pull request #4018 from shysank/fix_capi_example
Browse files Browse the repository at this point in the history
Fix CAPI example
  • Loading branch information
k8s-ci-robot committed Apr 16, 2021
2 parents 4eb1839 + 8b20473 commit 7e8972f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cluster-autoscaler/cloudprovider/clusterapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ these environment variables to set the namespace to deploy into as well as the i

```
export AUTOSCALER_NS=kube-system
export CAPI_NS=capi-system
export AUTOSCALER_IMAGE=us.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler:v1.20.0
envsubst < examples/deployment.yaml | kubectl apply -f-
```

### A note on permissions
The `cluster-autoscaler-management` role for accessing cluster api scalable resources is scoped to `ClusterRole`.
This may not be ideal for all environments (eg. Multi tenant environments).
In such cases, it is recommended to scope it to a `Role` mapped to a specific namespace.

Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,10 @@ rules:
- get
- update
---
kind: Role
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-autoscaler-management
namespace: ${CAPI_NS}
rules:
- apiGroups:
- cluster.x-k8s.io
Expand Down

0 comments on commit 7e8972f

Please sign in to comment.