-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
☸️ Can not run in Kubernetes? #109
Comments
Hi @hardy4yooz Thanks for your issue! 👍 I think you have a problem using the sandbox mechanism of Chromium. Please read this section of the README. In this chromium page, they indicate to test it -- I have to create an example using Kubernetes. |
Have the same problem. Running alpine-chrome in k8s fails. Executing my puppeteer script against the headless chrome I always get following error:
I choose to go with SYS_ADMIN caps and the default entry point: ...
containers:
- args:
- --remote-debugging-address=0.0.0.0
- --remote-debugging-port=9222
image: zenika/alpine-chrome
name: zenika-alpine-chrome
resources:
limits:
cpu: 4
memory: 8Gi
requests:
cpu: 1
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- SYS_ADMIN
drop:
- SETPCAP
- MKNOD
- AUDIT_WRITE
- CHOWN
- NET_RAW
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- SETGID
- SETUID
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp
name: tmp
- mountPath: /home/chrome
name: chrome
... The volume mounts are temporary volumes Already tried following and that did not help:
Running zenika/alpine-chrome locally via docker and with seccomp it works: docker container run -it --rm -d -p 9222:9222 --security-opt seccomp=$(pwd)/chrome_secomp.json zenika/alpine-chrome --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 |
The following issue might be a fix for this? #8 |
Hi @simonfrey 👋 First, thanks for your time! 👍 I don't know if it could work! I will take some time to investigate it. Can you share your K8S example in a PR in the Like I said, have you tested this?
|
As mentioned in my original answer: I tried the CAP_DAV_OVERIDE and the same error still occurs 😄 |
Hi @simonfrey Ok! thanks for the reply 😊 |
I will build an example :D Would you be so kind and add the hacktoberfest label so it counts into it :D |
Hey @simonfrey 👋 Yes, I added the label. 👍 |
Hi all, Thank you for your great work on this image and the example for k8s! I tried to run your example and I still got the following logs:
Is there a way to suppress them ? Note that the pod is running fine and I can use the service without error. |
Same here. Pod specs are: apiVersion: extensions/v1beta1
kind: Deployment
metadata:
...
spec:
...
template:
...
spec:
containers:
...
- args:
- --remote-debugging-port=9222
- --remote-debugging-address=0.0.0.0
- --headless
- --disable-gpu
image: zenika/alpine-chrome:83
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /json/version
port: 9222
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: chrome
readinessProbe:
failureThreshold: 3
httpGet:
path: /json/version
port: 9222
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- SYS_ADMIN
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
- mountPath: /tmp
name: tmp
- mountPath: /home/chrome
name: chrome
...
volumes:
- emptyDir: {}
name: tmp
- emptyDir: {}
name: chrome Logs are:
I also tried setting Kubernetes version is @simonfrey, can you please explain on |
I used another project instead. |
Hi @stanislav-zaprudskiy @hardy4yooz @CyberHippo 👋 Did you succeed with K8S? 🚀 @hardy4yooz Cool! What's the project? Perhaps we could add some help from them to resolve this problem... 👍 |
@jlandure, in our case the desired functionality of printing pages into PDF using Chrome works - nevertheless the error logs mentioned are still reported. |
Thanks for the update. 👍 Perhaps it is the same problem as described here in the Puppeteer project? 🤔 |
@hardy4yooz can you please share what project are you using? |
@jlandure |
Hello, is it possible to provide a clear solution for this ? i m facing the same issue |
Is there any solution here? I'm still facing this issue |
I have the same issue? |
Any news? |
/reopen |
Also still experiencing this issue |
/reopen - This is still happening. |
still not working |
same |
still happening |
same problem |
/reopen |
does not affect our tests' execution but keeps appearing v |
FYI for anyone experiencing issue, I suspect this may be related to a chrome renderer crash issue which has been occurring for us (i.e. "We detected that the Chromium Renderer process just crashed."). |
same here |
found "--disable-software-rasterizer" can fix the please fix |
I've seemingly been able to resolve this via these args: |
Describe the bug
Can this image run in Kubernetes? I got this error.
The text was updated successfully, but these errors were encountered: