You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

本地Open Shift升级咨询:从1.2.0升级至3.6/3.7或最新版

Upgrading OpenShift 1.2.0 (from thesteve0 Vagrant Box) to 3.6/3.7 or Latest Version

Hey there! Let's break down how to upgrade your local OpenShift 1.2.0 setup (from the thesteve0/openshift-origin Vagrant box) to either 3.6/3.7 or a more recent release. I'll cover two reliable methods—one for in-place upgrades, and a cleaner approach using a fresh Vagrant environment (better for big version jumps).

Option 1: In-Place Upgrade to OpenShift 3.6/3.7

This works if you want to keep your existing environment, but note that jumping from 1.2 to 3.x has significant API and configuration changes—always back up your data first!

  • Step 1: Backup your cluster resources
    Log into your cluster and export all project configurations to a local file:

    oc export all --all-namespaces > openshift-resources-backup.yaml
    

    If you have persistent data (like databases), copy it off the Vagrant VM to your local machine:

    vagrant scp default:/path/to/your/persistent/data ./local-backup/
    
  • Step 2: SSH into the Vagrant VM

    vagrant ssh
    
  • Step 3: Update the OpenShift YUM repo
    The old 1.2 repo is likely no longer active. Edit the repo file to point to the 3.6 or 3.7 CentOS 7 repository:
    For 3.7, create/edit /etc/yum.repos.d/openshift-origin.repo with:

    [openshift-origin]
    name=OpenShift Origin 3.7
    baseurl=https://mirror.openshift.com/pub/openshift-v3/repositories/centos7/origin/v3.7/
    enabled=1
    gpgcheck=0
    

    For 3.6, replace v3.7 in the baseurl with v3.6.

  • Step 4: Stop OpenShift services

    sudo systemctl stop origin-master-api origin-master-controllers origin-node
    
  • Step 5: Upgrade OpenShift packages

    sudo yum update origin* -y
    
  • Step 6: Verify the upgrade
    Check the installed version:

    oc version
    

    You should see output showing 3.6.x or 3.7.x.

  • Step 7: Restart services and validate the cluster

    sudo systemctl start origin-master-api origin-master-controllers origin-node
    

    Wait a few minutes, then check if all nodes and pods are healthy:

    oc get nodes
    oc get pods --all-namespaces
    

⚠️ Note: Some older 1.2 resources might not be compatible with 3.x APIs. If you run into issues, use your backup to recreate resources in the upgraded cluster.

Since 1.2 is drastically different from 3.6/3.7, starting fresh avoids compatibility headaches.

  • Step 1: Backup your data
    Follow the same backup steps as Option 1 to save your project resources and persistent data.

  • Step 2: Destroy the old Vagrant environment

    vagrant destroy -f
    
  • Step 3: Update your Vagrantfile
    Replace the old box reference with an official 3.6/3.7 OpenShift Origin box. For example, for 3.7:

    config.vm.box = "openshift/origin"
    config.vm.box_version = "v3.7.2"
    

    For 3.6, use box_version = "v3.6.1".

  • Step 4: Start the new environment

    vagrant up
    

    This will pull the new 3.x box and set up the cluster automatically.

  • Step 5: Restore your backup
    SSH into the new VM, log into the cluster, and recreate your projects and resources:

    oc create -f openshift-resources-backup.yaml
    

    Then copy your persistent data back to the appropriate paths in the new VM.

Upgrading to the Latest Version (OKD)

If you want the most recent release (now called OKD, the community version of OpenShift), note that OKD 4.x uses a different architecture (Operator-based) than 3.x. The Vagrant deployment method for 4.x is different from your original 1.2 setup, but you can:

  1. Use the official OKD 4.x local cluster tools like crc (CodeReady Containers) for a single-node cluster.
  2. Find updated Vagrant boxes for OKD 4.x (though they're less common than 3.x boxes).

For a smooth transition, starting fresh with crc is usually the easiest way to run the latest OKD locally.

内容的提问来源于stack exchange,提问作者u123

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:52:14