mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * getting-started/openshift-cli.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="getting-started-cli-granting-permissions_{context}"]
|
|
= Granting view permissions
|
|
|
|
{product-title} automatically creates several service accounts in every project. The `default` service account takes responsibility for running the pods. {product-title} 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 access to an {product-title} cluster.
|
|
* You have installed the OpenShift CLI (`oc`).
|
|
* You have `cluster-admin` or project-level `admin` privileges.
|
|
|
|
.Procedure
|
|
|
|
* Add the `view` role to the `default` service account in the `user-getting-started` project by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc adm policy add-role-to-user view -z default -n user-getting-started
|
|
----
|
|
+
|
|
[IMPORTANT]
|
|
====
|
|
If you are using a different project, replace `user-getting-started` with the name of your project.
|
|
====
|