docker-kubectl icon indicating copy to clipboard operation
docker-kubectl copied to clipboard

Unable to use in privileged mode

Open chaoscreater opened this issue 6 months ago • 0 comments

Hi,

I'm trying to run the container in privileged mode and while the container is created and runs fine, it doesn't have privilege. This means it can't access certain Linux binaries like "jq". Any ideas how I can get this to work with privilege mode?

Here's what I've got:

apiVersion: v1
kind: Pod
metadata:
  name: node-debug-shell-kubectl
  namespace: delete-terminating-pods
spec:
  hostNetwork: true
  hostPID: true
  hostIPC: true
  containers:
    - name: shell
      image: wernight/kubectl
      imagePullPolicy: IfNotPresent
      command:
        - nsenter
      args:
        - sleep
        - '14000'
      securityContext:
        privileged: true
  serviceAccount: sa-cronjob-runner
  serviceAccountName: sa-cronjob-runner

chaoscreater avatar Aug 01 '24 03:08 chaoscreater