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

[k8s] Add docs on minimal permissions required on Kubernetes cluster #2806

Closed
romilbhardwaj opened this issue Nov 20, 2023 · 3 comments
Closed
Labels
k8s Kubernetes related items

Comments

@romilbhardwaj
Copy link
Collaborator

Our docs should list the minimal Kubernetes RBAC Role and ClusterRole required for the user configured in the current kubecontext.

In addition, we should include a minimal example yamls for users to easily setup these roles. Here's some off the top of my head, we should verify if these work and possibly consolidate into fewer roles:

# r/w permissions on pods
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: default
  name: pod-reader
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "watch", "list", "create", "update", "delete"]

# Services
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: <your-namespace>
  name: service-manager-role
rules:
- apiGroups: [""]
  resources: ["services"]
  verbs: ["get", "watch", "list", "create", "update", "delete"]


# we'd also need ability to query nodes for resource status
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: node-reader
rules:
- apiGroups: [""]
  resources: ["nodes"]
  verbs: ["get", "watch", "list"]

# Create ssh key secrets
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: <your-namespace>
  name: secret-manager-role
rules:
- apiGroups: [""]
  resources: ["secrets"]
  verbs: ["create"]
@romilbhardwaj romilbhardwaj added the k8s Kubernetes related items label Nov 20, 2023
Copy link
Contributor

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Mar 20, 2024
@romilbhardwaj
Copy link
Collaborator Author

Being added in #3109.

@romilbhardwaj
Copy link
Collaborator Author

Added in #3377.

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

No branches or pull requests

1 participant