[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["This document describes how to upgrade an existing Kf installation and its dependencies.\n\n\u003cbr /\u003e\n\nAs part of the upgrade procedure, ensure that your Kf\ninstallation uses the latest version of the Kf operator:\n\n- Confirm your current Kf version can upgrade to Kf v2.6.1.\n- Upgrade to Kf v2.6.1.\n- Upgrade dependencies (if needed).\n\nBefore you begin **Warning:** Kf currently only supports upgrading one minor version at a time. The steps on this page are for upgrading Kf v2.5.x to Kf v2.6.1. If your current version is not Kf v2.5.x, you must first upgrade incrementally until your current version is v2.5.x.\n\nYou will need:\n\n- An existing cluster with Kf installed.\n- Access to a machine with `gcloud`, `kf`, and `kubectl` installed.\n\nPrepare for the upgrade\n\nConnect to your target cluster \n\n gcloud container hub memberships get-credentials \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --zone \u003cvar translate=\"no\"\u003eCLUSTER_ZONE\u003c/var\u003e \\\n --project \u003cvar translate=\"no\"\u003eCLUSTER_PROJECT_ID\u003c/var\u003e\n\nConfirm that your current Kf CLI and server versions match\n\nRun `kf debug` and validate the Kf CLI and\nKf server versions match.\n\n- The CLI version is listed under `Kf Client`.\n- The Kf server version is listed under `kf[\"app.kubernetes.io/version\"]`.\n\n $ kf debug\n ...\n Version:\n Kf Client: v2.5.4\n Server version: v1.21.3-gke.2001\n kf\\[\"app.kubernetes.io/version\"\\]: v2.5.4\n ...\n\nIf the Kf client and Kf server\nvalues **do not** match, but the server version is v2.5.x, [install](#upgrade-the-cli) the Kf v2.6.1 CLI before you continue.\n\nIf the Kf server value is older than v2.5.x, you must first incrementally upgrade to Kf v2.5.x to continue.\n\nConfirm that Kf is healthy before upgrading\n\nRun `kf doctor` to check the state of your cluster. Ensure all tests pass\nbefore you continue. \n\n $ kf doctor\n ...\n === RUN doctor/user\n === RUN doctor/user/ContainerRegistry\n --- PASS: doctor/user\n --- PASS: doctor/user/ContainerRegistry\n ...\n\nIf you see any `FAIL` or `Error: environment failed checks` messages, follow the\nguidance in the `kf doctor` output, or view the [troubleshooting guide](/migrate/kf/docs/2.6/support/troubleshooting) to resolve the issue and retry the command\nuntil it is successful.\n\nUpgrade the operator\n\nThe Kf operator performs upgrades for you.\n\n1. Apply the operator yaml:\n\n **Note:** This operation starts immediately, and is not reversible. \n\n ```\n kubectl apply -f \"https://storage.googleapis.com/kf-releases/v2.6.1/operator.yaml\"\n ```\n\nUpgrade Kf dependencies\n\n1. Upgrade Tekton:\n\n\n ```\n kubectl apply -f \"https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.26.0/release.yaml\"\n ```\n\n \u003cbr /\u003e\n\n2. Upgrade to the latest Cloud Service Mesh:\n\n 1. Follow the steps in the [Cloud Service Mesh upgrade guide](/service-mesh/docs/unified-install/upgrade).\n\nUpgrade to the Kf v2.6.1 CLI\n\n1. Install the CLI:\n\n Linux\n\n This command installs the Kf CLI for all users on the system. Follow the\n instructions in the Cloud Shell tab to install it just for yourself. \n\n gcloud storage cp gs://kf-releases/v2.6.1/kf-linux /tmp/kf\n chmod a+x /tmp/kf\n sudo mv /tmp/kf /usr/local/bin/kf\n\n Mac\n\n This command installs `kf` for all users on the system. \n\n gcloud storage cp gs://kf-releases/v2.6.1/kf-darwin /tmp/kf\n chmod a+x /tmp/kf\n sudo mv /tmp/kf /usr/local/bin/kf\n\n Cloud Shell\n\n This command installs `kf` on your Cloud Shell instance if you use `bash`,\n the instructions may need to be modified for other shells. \n\n mkdir -p ~/bin\n gcloud storage cp gs://kf-releases/v2.6.1/kf-linux ~/bin/kf\n chmod a+x ~/bin/kf\n echo \"export PATH=$HOME/bin:$PATH\" \u003e\u003e ~/.bashrc\n source ~/.bashrc\n\n Windows\n\n This downloads `kf` to current directory. Add it to the path if you\n want to call if from anywhere other than the current directory. \n\n gcloud storage cp gs://kf-releases/v2.6.1/kf-windows.exe kf.exe\n\n2. Validate the Kf CLI and\n Kf server versions match:\n\n - The CLI version is listed under `Kf Client`.\n - The Kf server version is listed under `kf[\"app.kubernetes.io/version\"]`.\n\n $ kf debug\n ...\n Version:\n Kf Client: v2.6.1\n Server version: v1.21.3-gke.2001\n kf\\[\"app.kubernetes.io/version\"\\]: v2.6.1\n ...\n\nVerify that Kf upgraded successfully\n\n1. Run `doctor` to ensure the newly installed version is healthy:\n\n kf doctor --retries=20\n\n The command runs cluster checks several times. It's normal for a few of\n the attempts to fail while the new controllers are starting.\n\n If the command fails with the message `Error: environment failed checks`,\n follow the guidance in the `doctor` output to resolve the issue and retry the\n command until it is successful.\n\nIf the verification steps pass, your cluster has successfully been upgraded! If you have any issues, please review the [support](/migrate/kf/docs/2.6/support) page for guidance."]]