2.3. Granting view permissions
Configure the necessary permissions for the application to access the required cluster resources.
OpenShift Container Platform automatically creates several service accounts in every project. The default service account takes responsibility for running the pods. OpenShift Container Platform uses and injects this service account into every pod that launches.
By default, the default service account has limited permissions to interact with the OpenShift API.
As a requirement of the application, you must assign the view role to the default service account to allow it to communicate with the OpenShift API to learn about pods, services, and resources within the project.
Prerequisites
-
You have
cluster-adminor project-leveladminprivileges.
Procedure
-
Navigate to User Management
RoleBindings. - Click Create binding.
-
In the Name field, enter
sa-user-account. In the Namespace field, search for and select
user-getting-started.중요If you are using a different project, select the name of your project.
-
In the Role name field, search for and select
view. -
Under Subject, select
ServiceAccount. In the Subject namespace field, search for and select
user-getting-started.중요If you are using a different project, select the name of your project.
-
In the Subject name field, enter
default. - Click Create.