1.14.2. Resolving the problem: Troubleshooting local cluster not selected
To resolve this issue, you need to grant the deployable administrative permission in the local-cluster
namespace. Complete the following steps:
Confirm that the list of managed clusters does include
local-cluster
, and that the placement ruledecisions
list does not display the local cluster. Run the following command and view the results:% oc get managedclusters
NAME HUB ACCEPTED MANAGED CLUSTER URLS JOINED AVAILABLE AGE local-cluster true True True 56d cluster1 true True True 16h
apiVersion: apps.open-cluster-management.io/v1 kind: PlacementRule metadata: name: all-ready-clusters namespace: default spec: clusterSelector: {} status: decisions: - clusterName: cluster1 clusterNamespace: cluster1
Create a
Role
in your.yaml
file to grant the deployable administrative permission in thelocal-cluster
namespace. See the following example:apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: deployables-admin-user-zisis namespace: local-cluster rules: - apiGroups: - apps.open-cluster-management.io resources: - deployables verbs: - '*'
Create a
RoleBinding
resource to grant the placement rule user access to thelocal-cluster
namespace. See the following example:apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: deployables-admin-user-zisis namespace: local-cluster roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: deployables-admin-user-zisis namespace: local-cluster subjects: - kind: User name: zisis apiGroup: rbac.authorization.k8s.io