A X*_*A X 8 command-line-interface docker kubernetes
我需要在 Kubernetes 中运行这个 Docker 命令:
docker run -p 8080:8080 sagemath/sagemath sage -notebook
Run Code Online (Sandbox Code Playgroud)
我可以映射除“-notebook”之外的所有内容 - 有谁知道怎么做?
这是我到目前为止所拥有的,当然它不起作用,因为“-notebook”没有正确转换为 kubectl:
kubectl run --image=sagemath/sagemath sage --port=8080 --type=LoadBalancer -notebook
Run Code Online (Sandbox Code Playgroud)
当你为你的 sage 定义 pod spec 时,你可以同时定义command和一个args数组,所以对你来说就像
command: sage
args:
- -notebook
Run Code Online (Sandbox Code Playgroud)
用于启动 kubectl run
Usage:
kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...] [options]
Run Code Online (Sandbox Code Playgroud)
所以尝试使用--分隔符运行:kubectl run --image=sagemath/sagemath --port=8080 --type=LoadBalancer -- sage -notebook
| 归档时间: |
|
| 查看次数: |
10093 次 |
| 最近记录: |