Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 00-spectro-k8s-dashboard.md #1161

Merged
merged 16 commits into from
Mar 10, 2023
Merged

Conversation

arvind-sys
Copy link
Contributor

@arvind-sys arvind-sys commented Mar 8, 2023

This PR adds new content to the Kubernetes Dashboard Pack related to RBAC.
💻 Preview

@spectro-prow
Copy link

Hi @arvind-sys. Thanks for your PR.

I'm waiting for a spectrocloud member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@netlify
Copy link

netlify bot commented Mar 8, 2023

Deploy Preview for docs-spectrocloud ready!

Name Link
🔨 Latest commit 2de5d6e
🔍 Latest deploy log https://app.netlify.com/sites/docs-spectrocloud/deploys/640b76b394219c0008e4f779
😎 Deploy Preview https://deploy-preview-1161--docs-spectrocloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

content/docs/06-integrations/00-frp.md Show resolved Hide resolved
content/docs/06-integrations/00-frp.md Show resolved Hide resolved
content/docs/06-integrations/00-frp.md Show resolved Hide resolved
content/docs/06-integrations/00-frp.md Show resolved Hide resolved
content/docs/06-integrations/00-frp.md Show resolved Hide resolved
content/docs/06-integrations/00-frp.md Show resolved Hide resolved
@spectro-prow spectro-prow added size/L and removed size/S labels Mar 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

Images automagically compressed by Calibre's image-actions

Compression reduced images by 28.1%, saving 115.66 KB.

Filename Before After Improvement Visual comparison
assets/docs/images/clusters_cluster-management_cluster-rbac_cluster-creation-settings.png 135.01 KB 93.62 KB -30.7% View diff
assets/docs/images/clusters_cluster-management_cluster-rbac_cluster-settings.png 240.60 KB 183.44 KB -23.8% View diff
assets/docs/images/clusters_cluster-management_cluster-rbac_cluster-subject-group.png 36.63 KB 19.53 KB -46.7% View diff

235 images did not require optimisation.

@karl-cardenas-coding karl-cardenas-coding marked this pull request as draft March 9, 2023 13:22
@spectro-prow spectro-prow added the do-not-merge/work-in-progress Work in-progress. DO NOT MERGE label Mar 9, 2023
@karl-cardenas-coding karl-cardenas-coding marked this pull request as ready for review March 9, 2023 15:51
@spectro-prow spectro-prow removed the do-not-merge/work-in-progress Work in-progress. DO NOT MERGE label Mar 9, 2023
Copy link
Contributor

@ritawatson ritawatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added flow diagram is helpful.

I noticed that sometimes roleBinding is used and sometimes RoleBinding. I started correcting this to be RoleBinding and thought instead I'd just point it out. You may want to search and correct for consistency.

Other minor corrections are needed.

Co-authored-by: Rita Watson <117382432+ritawatson@users.noreply.github.com>
@@ -94,11 +98,23 @@ However, if you change **Access** to **Public** and your cluster is in a private

#### Identity Provider

All IDP options below require you to map a set of users or groups to a Kubernetes RBAC role. There are two options you can use to get started with the Kubernetes Dashboard and an IDP.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[write-good.ThereIs] Don't start a sentence with 'There are'.

@@ -13,197 +13,264 @@ import PointsOfInterest from 'shared/components/common/PointOfInterest';

# Overview

RoleBindings and ClusterRoleBindings are Role-Based Access Control (RBAC) concepts that allow granular control over cluster-wide resources as well as namespaced resources. Palette provides the ability to specify these bindings to configure granular RBAC rules. Palette also can define new namespaces for the cluster and manage (remove, assign quota, assign role bindings, etc.) them.
[*RoleBindings*](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#rolebinding-and-clusterrolebinding) and *ClusterRoleBindings* are Role-Based Access Control (RBAC) concepts that allow granular control over cluster-wide resources. Palette provides you the ability to specify bindings to configure granular RBAC rules.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBindings' instead of 'RoleBindings'.

verbs: ["get", "watch", "list"]
```

- **RoleBinding** associates a subject with a role. A subject can be a user, a group, or a [*ServiceAccount*](https://kubernetes.io/docs/concepts/security/service-accounts/). A RoleBinding is used to grant permissions to a subject. Role and RoleBinding are used to scope a subject to a specific Kubernetes namespace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.

verbs: ["get", "watch", "list"]
```

- **RoleBinding** associates a subject with a role. A subject can be a user, a group, or a [*ServiceAccount*](https://kubernetes.io/docs/concepts/security/service-accounts/). A RoleBinding is used to grant permissions to a subject. Role and RoleBinding are used to scope a subject to a specific Kubernetes namespace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.


There are many reasons why you may want to create roles and assign permissions to different users or groups. Below are a few common scenarios.

* Use Role and a RoleBinding to scope security to a single Kubernetes namespace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.

There are many reasons why you may want to create roles and assign permissions to different users or groups. Below are a few common scenarios.

* Use Role and a RoleBinding to scope security to a single Kubernetes namespace.
* Use Role and a RoleBinding to scope security to several Kubernetes namespaces.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.

</WarningBox>


Use the steps below to create a RoleBinding or ClusterRoleBinding for your host clusters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.

The RBAC settings view contains two tabs:

* **Cluster**: Use this tab to create a ClusterRoleBinds.
* **Namespaces**: Use this tab to create a RoleBinding within Kubernetes namespaces.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.


<InfoBox>
Palette does not provide a way for roles to be configured natively through its platform. However, you may choose to create roles using a manifest layer in the cluster profile. RBAC management only allows you to specify bindings.

In Kubernetes, a RoleBinding connects a user or group with a set of permissions called a Role. The Role can be in the same namespace as the RoleBinding. If you want to give a role access to all the namespaces in your cluster, use a ClusterRoleBinding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.


<InfoBox>
A RoleBinding may reference any Role in the same namespace. Alternatively, a RoleBinding can reference a ClusterRole and bind that ClusterRole to the namespace of the RoleBinding. For example, if you want to bind a ClusterRole to all the namespaces in your cluster, you use a ClusterRoleBinding.

In Kubernetes, a RoleBinding connects a user or group with a set of permissions called a Role. The Role can be in the same namespace as the RoleBinding. If you want to give a role access to all the namespaces in your cluster, use a ClusterRoleBinding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'roleBinding' instead of 'RoleBinding'.

@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 42.9%, saving 127.95 KB.

Filename Before After Improvement Visual comparison
assets/docs/images/integrations_spectro-k8s-dashboard_diagram-flow-users.png 298.53 KB 170.58 KB -42.9% View diff

239 images did not require optimisation.

@spectro-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arvind-sys, karl-cardenas-coding, ritawatson
To complete the pull request process, please assign
You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -38,6 +38,10 @@ We recommend using the pack defaults. Default settings provide best practices fo

- Outbound internet connectivity for port 443 is allowed so that you and your applications can connect with the Spectro Cloud reverse proxy.


- Users or groups must be mapped to a Kubernetes RBAC role, either a *Role* or a *ClusterRole*. You can create a custom role through a manifest and use Palette's roleBinding feature to associate the users or groups with the role. Refer to the [Create a Role Binding](/clusters/cluster-management/cluster-rbac#createrolebindings) guide to learn more.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBinding' instead of 'roleBinding'.

@@ -94,11 +98,23 @@ However, if you change **Access** to **Public** and your cluster is in a private

#### Identity Provider

All IDP options below require you to map a set of users or groups to a Kubernetes RBAC role. There are two options you can use to get started with the Kubernetes Dashboard and an IDP.

* You can create a custom role by using a manifest file in your cluster profile and specifying the creation of a Role or ClusterRole. You can also specify the roleBinding in the same manifest file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBinding' instead of 'roleBinding'.

* You can create a custom role by using a manifest file in your cluster profile and specifying the creation of a Role or ClusterRole. You can also specify the roleBinding in the same manifest file.


* Alternatively, you can use the [default Kubernetes cluster roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) that are available and create a roleBinding for a set of users or groups. As an example, you could assign yourself or another user a roleBinding to the role `view` or `cluster-admin`. By assigning yourself or your users one of the default Kubernetes roles, you will be able to view resources in the Kubernetes Dashboard. Use the [Create a Role Binding](/clusters/cluster-management/cluster-rbac#createrolebindings) guide to learn more.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBinding' instead of 'roleBinding'.

* You can create a custom role by using a manifest file in your cluster profile and specifying the creation of a Role or ClusterRole. You can also specify the roleBinding in the same manifest file.


* Alternatively, you can use the [default Kubernetes cluster roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) that are available and create a roleBinding for a set of users or groups. As an example, you could assign yourself or another user a roleBinding to the role `view` or `cluster-admin`. By assigning yourself or your users one of the default Kubernetes roles, you will be able to view resources in the Kubernetes Dashboard. Use the [Create a Role Binding](/clusters/cluster-management/cluster-rbac#createrolebindings) guide to learn more.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBinding' instead of 'roleBinding'.


Users can configure namespaces and RBAC directly from within a cluster or from a workspace that contains a collection of homogenous clusters that need to be managed as a group.
You can configure namespaces and RBAC from within a cluster or from a [Palette Workspace](/workspace) that contains a collection of like clusters that need to be managed as a group. If a host cluster is part of a Palette workspace, then all roleBindings must occur at the namespace level.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBindings' instead of 'roleBindings'.


While configuring the cluster (Cluster Settings) during the cluster creation, the user can select RBAC from the left menu. There are two available options for setting up RBAC:
<Tabs.TabPane tab="Assigne a Namespace Role" key="roleBinding">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'RoleBinding' instead of 'roleBinding'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants