Skip to content

Instantly share code, notes, and snippets.

@MahdiKarimipour
Created May 6, 2023 12:04
Show Gist options
  • Save MahdiKarimipour/1e7063d0e854e74c0278b477a77c7256 to your computer and use it in GitHub Desktop.
Save MahdiKarimipour/1e7063d0e854e74c0278b477a77c7256 to your computer and use it in GitHub Desktop.
Image Pull Seret RBAC file
apiVersion: v1
kind: ServiceAccount
metadata:
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: imagepullsecret-patcher
name: imagepullsecret-patcher
rules:
- apiGroups:
- ""
resources:
- secrets
- serviceaccounts
verbs:
- list
- patch
- create
- get
- delete
- apiGroups:
- ""
resources:
- namespaces
verbs:
- list
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: imagepullsecret-patcher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: imagepullsecret-patcher
subjects:
- kind: ServiceAccount
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment