Is there any definitive guide on how to pass all the arguments to Docker containers while starting a container through kubernetes?

3/22/2017

I want to start a docker container with Kubernetes with the parameter --oom-score-adj . My kubernetes deployment script looks like this:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: xxx
spec:
  template:
    metadata:
      labels:
        app: xxx
    spec:
       volumes:
         - name: some-name
           hostPath:
             path: /some-path
       containers:
       - name: xxx-container
         image: xxx-image
         imagePullPolicy: "IfNotPresent"
         securityContext:
           privileged: true
         command:
         - /bin/sh
         - -c
         args:
         -  ./rsome-command.sh
         volumeMounts:
         - name: some-name
           mountPath: /some-path

When I inspect the created container, I find --oom-score-adj is set to 1000. I want to set it to 0. Can anyone shed any line on how can I do it? Is there any definitive guide to pass such arguments?

-- Abhishek Dasgupta
docker
kubernetes

1 Answer

3/22/2017

You can't do this yet, it's one of the frustrating things still unresolved with Kubernetes.

There's a similar issue here around logging drivers. Unfortunately, you'll have to set the value on the docker daemon

-- jaxxstorm
Source: StackOverflow