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 ruledecisionslist does not display the local cluster. Run the following command and view the results:% oc get managedclustersNAME HUB ACCEPTED MANAGED CLUSTER URLS JOINED AVAILABLE AGE local-cluster true True True 56d cluster1 true True True 16hapiVersion: apps.open-cluster-management.io/v1 kind: PlacementRule metadata: name: all-ready-clusters namespace: default spec: clusterSelector: {} status: decisions: - clusterName: cluster1 clusterNamespace: cluster1Create a
Rolein your.yamlfile to grant the deployable administrative permission in thelocal-clusternamespace. 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
RoleBindingresource to grant the placement rule user access to thelocal-clusternamespace. 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