Skip to content

Instantly share code, notes, and snippets.

@alphajc
Last active December 19, 2023 11:50
Show Gist options
  • Save alphajc/389b79c705d9d9fbc4f8e4bf0c96b54b to your computer and use it in GitHub Desktop.
Save alphajc/389b79c705d9d9fbc4f8e4bf0c96b54b to your computer and use it in GitHub Desktop.
ERROR: Job failed (system failure): pods is forbidden: User "system:serviceaccount:gitlab:default" cannot create resource "pods" in API group "" in the namespace "gitlab"
# Source: gitlab-runner/templates/service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
namespace: gitlab
---
# Source: gitlab-runner/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: "ClusterRole"
metadata:
name: default
namespace: gitlab
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
# Source: gitlab-runner/templates/role-binding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: "ClusterRoleBinding"
metadata:
name: default
namespace: gitlab
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: "ClusterRole"
name: default
subjects:
- kind: ServiceAccount
name: default
namespace: gitlab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment