Kubelet protect-kernel-defaults set to false
This product is not supported for your selected
Datadog site. (
).
このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
Id: 6cf42c97-facd-4fda-b8af-ea4529123355
Cloud Provider: Kubernetes
Platform: Kubernetes
Severity: Medium
Category: Insecure Configurations
Learn More
Description
The --protect-kernel-defaults flag must be set to true.
If kubelet is started via a container command, the command must not include --protect-kernel-defaults=false.
For KubeletConfiguration resources, the protectKernelDefaults field must be defined and set to true.
Compliant Code Examples
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: foo/bar
command: ["kubelet"]
args: ["--protect-kernel-defaults=true"]
restartPolicy: OnFailure
{
"kind": "KubeletConfiguration",
"apiVersion": "kubelet.config.k8s.io/v1beta1",
"port": 10250,
"readOnlyPort": 10255,
"cgroupDriver": "cgroupfs",
"protectKernelDefaults": true,
"hairpinMode": "promiscuous-bridge",
"serializeImagePulls": false,
"featureGates": {
"RotateKubeletClientCertificate": true,
"RotateKubeletServerCertificate": true
}
}
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: foo/bar
command: ["kubelet"]
args: []
restartPolicy: OnFailure
Non-Compliant Code Examples
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: foo/bar
command: ["kubelet","--protect-kernel-defaults=false"]
args: []
restartPolicy: OnFailure
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
address: "192.168.0.8"
port: 20250
protectKernelDefaults: false
serializeImagePulls: false
tlsCertFile: "someFile.txt"
tlsPrivateKeyFile: "someFile.txt"
evictionHard:
memory.available: "200Mi"
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
address: "192.168.0.8"
port: 20250
serializeImagePulls: false
tlsCertFile: "someFile.txt"
tlsPrivateKeyFile: "someFile.txt"
evictionHard:
memory.available: "200Mi"