我想在Kubernetes中托管一个TDengine集群,然后在容器中启用核心转储时遇到错误。
我搜索了Stack Overflow,找到了Docker解决方案How to modify the core\_pattern when building docker image,但没有找到Kubernetes解决方案。
发布于 2021-09-12 15:02:58
下面是一个例子:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-app
spec:
template:
spec:
containers:
- image: my-image
name: my-app
...
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0发布于 2021-09-18 16:58:40
只是对挑选的答案的一些修复,最终有效的yaml是:
apiVersion: apps/v1
kind: Deployment
metadata:
name: core
spec:
selector:
matchLabels:
app: core
template:
metadata:
labels:
app: core
spec:
containers:
- image: zitsen/enable-coredump:0.1.0
name: core
command: ["/bin/sleep", "3650d"]
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0https://stackoverflow.com/questions/69152151
复制相似问题