【发布时间】:2021-11-26 21:39:19
【问题描述】:
我正在尝试使用以下命令运行我的 pod,但不断出现错误:
error: Invalid JSON Patch
kubectl run -i tmp-pod --rm -n=my-scripts --image=placeholder --restart=Never --overrides= "$(cat pod.json)"
这是我的pod.json 文件:
{
"apiVersion": "v1",
"kind": "Pod",
"metadata": {
"name": "test",
"namespace": "my-ns",
"labels": {
"app": "test"
}
},
"spec": {
"containers": [
{
"name": "test",
"image": "myimage",
"command": [
"python",
"/usr/bin/cma/excute.py"
]
}
]
}
}
我在这里做错了什么?
【问题讨论】:
标签: json kubernetes kubectl kubernetes-pod