首页 > 解决方案 > 更改配置后如何部署发布?

问题描述

我已经成功地在我的集群中发布了 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。

标签: kubernetesjupyterdevopskubernetes-helmjupyterhub

解决方案


当我尝试config.yaml在 GKE 中更新我的文件时,我遇到了同样的问题。实际上对我有用的是重做这些步骤:

  1. curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash

  2. helm init --service-account tiller --history-max 100 --wait

  3. [可选]helm version验证您是否具有与文档类似的输出

  4. 添加回购

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
  1. 运行升级
RELEASE=jhub
NAMESPACE=jhub

helm upgrade $RELEASE jupyterhub/jupyterhub \
  --namespace $NAMESPACE  \
  --version=0.9.0 \
  --values config.yaml

推荐阅读