This page explains how to restrict view
access to cluster resources based on specific namespaces, and how users with
restricted access can view these resources on the Google Cloud console. This scenario is common for
organizations that run [multi-tenant](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/multitenancy-overview.md.txt)
Google Kubernetes Engine (GKE) clusters.

This page is for
Security specialists and Operators who want to provide users
with restricted access to cluster resources for specific namespaces.
To learn more about
common roles and example tasks that we reference in Google Cloud content, see
[Common GKE user roles and tasks](https://docs.cloud.google.com/kubernetes-engine/enterprise/docs/concepts/roles-tasks.md.txt).

Before reading this page, ensure that you're familiar with the following namespace concepts:

- [Organizing Kubernetes with Namespaces](https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-organizing-with-namespaces)
- [Enterprise multi-tenancy best practices](https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/enterprise-multitenancy.md.txt#create-namespaces)

## Enable namespace-restricted access to cluster resources

You can use tenant permissions to restrict user interactions with the cluster on
the Google Cloud console. You grant users the
[`roles/container.clusterViewer`](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/iam.md.txt#predefined)
IAM permission as well as
[role-based access control (RBAC) permissions](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control.md.txt)
to view resources in specific namespaces.

> [!NOTE]
> **Note:** By default, the Google Cloud console expects users to have view access to all namespaces in all clusters (that is, users have the `roles/container.viewer` IAM permission). If the user only has access to specific namespaces, they should follow the steps described in [View namespace-restricted resources in
> the Google Cloud console](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/restrict-resources-access-by-namespace#viewing-resources).

To learn more about using namespaces, see
[Organizing Kubernetes with Namespaces](https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-organizing-with-namespaces)
and [Enterprise multi-tenancy best practices](https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/enterprise-multitenancy.md.txt#create-namespaces).

## View namespace-restricted resources in the Google Cloud console

If you have limited IAM or RBAC permissions and want to view
namespace-restricted resources on the Google Cloud console, follow these steps:

1. Go to the **Workloads** page in the Google Cloud console.

   [Go to Workloads](https://console.cloud.google.com/kubernetes/workload/overview)
2. Click the **Namespace** drop-down list.

3. Click **Add filter**.

4. Enter the namespace you want to access, then click **Save**.

5. Click **OK**.

The list will be filtered to show the selected namespace.

## Share saved views

You can also save the filtered list as a named *saved view*. The saved view
will persist across sessions, and can be shared with other users.

To share a saved view, follow these steps:

1. Select the saved view from the **Saved view** drop-down list.
2. Next to the **Saved view** drop-down list, click , then click **Share**.
3. Click to copy the URL in the **Share view** dialog. You can share this URL with other users who need access to the same cluster and namespaces.