[英]Kubernetes Job not recognizing fsGroup in Pod
I've tried to add fsGroup to a Job with no luck, the generated Pod doesn't include the fsGroup in the security context. 我试图将fsGroup添加到Job没有运气,生成的Pod在安全上下文中不包含fsGroup。 Does a Kube Job allow for the fsGroup to be specified and then propagated to the generated Pod?
Kube作业是否允许指定fsGroup然后传播到生成的Pod?
I'm using Kubernetes 1.4 and successfully created a job with fsGroup
. 我正在使用Kubernetes 1.4并成功创建了一个
fsGroup
的工作。 Maybe you misplaced fsGroup
in your manifest? 也许你在你的清单中放错了
fsGroup
? This is my manifest: 这是我的表现:
apiVersion: batch/v1
kind: Job
metadata:
name: hello-world
spec:
template:
metadata:
name: hello-world
spec:
containers:
- name: hello-world-container
image: hello-world
securityContext:
fsGroup: 1234
restartPolicy: OnFailure
Output from kubectl describe job hello-world
: kubectl describe job hello-world
输出kubectl describe job hello-world
:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
4m 4m 1 {job-controller } Normal SuccessfulCreate Created pod: hello-world-yzyz7
Output from kubectl get pod hello-world-yzyz7 -o yaml | grep fsGroup
来自
kubectl get pod hello-world-yzyz7 -o yaml | grep fsGroup
输出kubectl get pod hello-world-yzyz7 -o yaml | grep fsGroup
kubectl get pod hello-world-yzyz7 -o yaml | grep fsGroup
: kubectl get pod hello-world-yzyz7 -o yaml | grep fsGroup
:
fsGroup: 1234
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.