6.9. Customizing user perspectives


The OpenShift Container Platform web console provides two perspectives by default, Administrator and Developer. You might have more perspectives available depending on installed console plugins. As a cluster administrator, you can show or hide a perspective for all users or for a specific user role. Customizing perspectives ensures that users can view only the perspectives that are applicable to their role and tasks. For example, you can hide the Administrator perspective from unprivileged users so that they cannot manage cluster resources, users, and projects. Similarly, you can show the Developer perspective to users with the developer role so that they can create, deploy, and monitor applications.

You can also customize the perspective visibility for users based on role-based access control (RBAC). For example, if you customize a perspective for monitoring purposes, which requires specific permissions, you can define that the perspective is visible only to users with required permissions.

Each perspective includes the following mandatory parameters, which you can edit in the YAML view:

  • id: Defines the ID of the perspective to show or hide
  • visibility: Defines the state of the perspective along with access review checks, if needed
  • state: Defines whether the perspective is enabled, disabled, or needs an access review check
注意

By default, all perspectives are enabled. When you customize the user perspective, your changes are applicable to the entire cluster.

6.9.1. Customizing a perspective using YAML view

Prerequisites

  • You must have administrator privileges.

Procedure

  1. In the Administrator perspective, navigate to Administration Cluster Settings.
  2. Select the Configuration tab and click the Console (operator.openshift.io) resource.
  3. Click the YAML tab and make your customization:

    1. To enable or disable a perspective, insert the snippet for Add user perspectives and edit the YAML code as needed:

      apiVersion: operator.openshift.io/v1
      kind: Console
      metadata:
        name: cluster
      spec:
        customization:
          perspectives:
            - id: admin
              visibility:
                state: Enabled
            - id: dev
              visibility:
                state: Enabled
    2. To hide a perspective based on RBAC permissions, insert the snippet for Hide user perspectives and edit the YAML code as needed:

      apiVersion: operator.openshift.io/v1
      kind: Console
      metadata:
        name: cluster
      spec:
        customization:
          perspectives:
            - id: admin
              requiresAccessReview:
                - group: rbac.authorization.k8s.io
                  resource: clusterroles
                  verb: list
            - id: dev
              state: Enabled
    3. To customize a perspective based on your needs, create your own YAML snippet:

      apiVersion: operator.openshift.io/v1
      kind: Console
      metadata:
        name: cluster
      spec:
        customization:
          perspectives:
            - id: admin
              visibility:
                state: AccessReview
                accessReview:
                  missing:
                    - resource: deployment
                      verb: list
                  required:
                    - resource: namespaces
                      verb: list
            - id: dev
              visibility:
                state: Enabled
  4. Click Save.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部