kubernetes - 更改配置后如何部署发布?
问题描述
我已经成功地在我的集群中发布了 jhub。然后我更改了配置以提取另一个 docker 映像,如文档中所述。
这一次,在运行相同的旧命令时:
# Suggested values: advanced users of Kubernetes and Helm should feel
# free to use different values.
RELEASE=jhub
NAMESPACE=jhub
helm upgrade --install $RELEASE jupyterhub/jupyterhub \
--namespace $NAMESPACE \
--version=0.8.2 \
--values jupyter-hub-config.yaml
文件在哪里jupyter-hub-config.yaml
:
proxy:
secretToken: "<a secret token>"
singleuser:
image:
# Get the latest image tag at:
# https://hub.docker.com/r/jupyter/datascience-notebook/tags/
# Inspect the Dockerfile at:
# https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook/Dockerfile
name: jupyter/datascience-notebook
tag: 177037d09156
我遇到以下问题:
UPGRADE FAILED
ROLLING BACK
Error: "jhub" has no deployed releases
Error: UPGRADE FAILED: "jhub" has no deployed releases
然后我删除了命名空间 viakubectl delete ns/jhub
和 release via helm delete --purge jhub
。再次徒劳地尝试了这个命令,再次出现同样的错误。
我阅读了一些 GH 问题,发现 YAML 文件无效或--force
标志有效。但是,就我而言,这两个都不是有效的。
我希望发布这个版本,并学习如何编辑当前版本。
注意:正如您在上述文档中发现的那样,创建了一个 pvc。
解决方案
当我尝试config.yaml
在 GKE 中更新我的文件时,我遇到了同样的问题。实际上对我有用的是重做这些步骤:
跑
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
helm init --service-account tiller --history-max 100 --wait
[可选]
helm version
验证您是否具有与文档类似的输出添加回购
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
- 运行升级
RELEASE=jhub
NAMESPACE=jhub
helm upgrade $RELEASE jupyterhub/jupyterhub \
--namespace $NAMESPACE \
--version=0.9.0 \
--values config.yaml
推荐阅读
- sql - SQL - 此查询需要帮助 - 表 A 和表 B 连接两个表并且不会丢失数据计数
- python - Django - 附加字典值返回空字典
- android-studio - 如何从 C 分区移动 adbkey 文件路径?
- javascript - 在包含中使用项目 ID
- python - 一些输入的输出应该是“错误的数字”,但我没有得到那个输入。我究竟做错了什么?
- python - Faker.Credit_card_number 函数从特定提供商生成卡片
- javascript - 如何使仅列表的内容可编辑?
- ruby-on-rails - Rails ActsAsTaggableOn,按相似标签的数量对“tagged_with”结果进行排名
- javascript - 如何模拟和测试 Axios 拒绝的承诺?
- html - Flexbox:如何防止非重叠按钮调整大小