我正在尝试在openshift项目中运行elasticsearch容器。
我有错误: 特权容器不允许使用capability.add:无效值: “IPC_LOCK”:可能无法添加功能……
仅供参考,我介绍一下这个例子 yaml 格式。
yaml
ServiceAccount
oc patch dc/your-deploymentConfigName
# oc patch dc/elasticsearch --patch '{"spec":{"template":{"spec":{"serviceAccountName": "logging"}}}}'
oc edit dc/your-deploymentConfigName
serviceAccountName
# oc edit dc/elasticsearch ... spec: containers: - image: docker-registry.default.svc:5000/test/... imagePullPolicy: Always name: web ports: - containerPort: 8080 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: logging serviceAccountName: logging