GoogleContainerTools / GoogleContainerTools/skaffold

Where I can find example Role for kaniko with skaffold

Open
#8,495 2 comments 0 reactions 0 assignees View on GitHub
kind/question
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
Run skaffold build with kaniko in self manage kuberntes cluster with role only for create pod and read secret.

### Actual behavior
I run skaffold build in remote kubernetes, Kaniko pod in kubernetes cluster wont start. I cant find any logs, errors - nothing.
I run it in K3S, Pod has status Init:0/1 and that's it.

```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kaniko-access
namespace: kaniko
rules:
- apiGroups:
- ""
resources: ["pods", "secrets"]
verbs:
- '*'
```

With this role, everything works.
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kaniko-access
namespace: kaniko
rules:
- apiGroups:
- ""
resources:
- '*'
verbs:
- '*'
```

But when I want to add some resources ["pods", "secrets"] pod stuck. I tried to add all available resources in k8s, but with that list, pod stuck too. Is there a list with required resources list for kaniko in kubernetes cluster?

### Information

- Skaffold version: 2.1.0
- Operating system: Ubuntu
- Installed via: Skaffold.dev + Self manager kubernretes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.