-
Notifications
You must be signed in to change notification settings - Fork 36
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
passing service-account flag gives the message there isn't a valid docker environment #105
Comments
I think the error is in the arguments: |
I just tried but i am still getting the following exception: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"pods is forbidden: User "system:serviceaccount:namespace:default" cannot create resource "pods" in API group "" in the namespace "namespace""} It doesn't seem to be setting the service account. |
The service account argument makes sure the pods that are created by kubedock hade the specified service account configured. Your error is about kubedock itself not having the permissions of creating pods. The token kubedock is using, should have the proper rbac as well. |
true, but i see in the logs it is grabbing the default service account and not the one i specified. I have created a service account with the rbac permissions and tied the permissions to the service account. |
The same happens to me. I passed the service-account with the valid arguments: apiVersion: v1
kind: Pod
spec:
containers:
- name: kubedock
image: kubedock
imagePullPolicy: Always
tty: true
args:
- server
- --port-forward
# Verbosity level which is helpful to troubleshot issues when starting up containers
- -v
- 10
# Service account from jenkins cluster having port-forward permissions
- --service-account
- my-service-account I do see my service account is used at start:
But when trying to use it, it fails with:
Note that dno--jenkins-csb-smqe is used instead of my-service-account. |
See also: #122 (comment) |
I am trying to setup kubedock. When i don't pass the service account flag I run into the issue that the basic service account doesn't have privileges to create the pod. When i pass the service account flag in a gitlab pipeline like this:
services:
command: ["server", "--reverse-proxy", "--service-account my-serviceaccount"]
it throws the exception that no valid docker environment can be found. Docker is not installed on our cluster. We use job to build images and push them to kubernetes.
The text was updated successfully, but these errors were encountered: