3.3. Upgrading the Central cluster


After you have created a backup of the Central database and generated the necessary resources by using the provisioning bundle, the next step is to upgrade the Central cluster. This process involves upgrading Central and Scanner.

3.3.1. Upgrading Central

You can update Central to the latest version by downloading and deploying the updated images.

注意

If you use Kubernetes, enter kubectl instead of oc.

Procedure

  1. To update the Central image, run the following command:

    $ oc -n stackrox set image deploy/central \
    central=registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.7.8
  2. To update the Central-db image, run the following command:

    $ oc -n stackrox set image deploy/central-db \
    central-db=registry.redhat.io/advanced-cluster-security/rhacs-central-db-rhel8:4.7.8 \
    init-db=registry.redhat.io/advanced-cluster-security/rhacs-central-db-rhel8:4.7.8
  3. To update the config controller image, run the following command:

    $ oc -n stackrox set image deploy/config-controller \
    manager=registry.redhat.io/advanced-cluster-security/rhacs-main-rhel8:4.7.8

Verification

  • Verify that the new pods have deployed:

    $ oc get deploy -n stackrox -o wide
    $ oc get pod -n stackrox --watch

3.3.2. Upgrading Scanner

You can update Scanner to the latest version by downloading and deploying the updated images.

重要

If you are using Kubernetes, enter the kubectl command instead of the oc command.

Procedure

  1. If you have created custom Scanner configurations, you must apply these changes before updating the Scanner configuration file:

    1. To generate Scanner, run the following command:

      $ roxctl -e "$ROX_CENTRAL_ADDRESS" scanner generate
    2. To apply the TLS secrets YAML file, run the following command:

      $ oc apply -f scanner-bundle/scanner/02-scanner-03-tls-secret.yaml
    3. To apply the Scanner configuration YAML file, run the following command:

      $ oc apply -f scanner-bundle/scanner/02-scanner-04-scanner-config.yaml
  2. To update the Scanner image, run the following command:

    $ oc -n stackrox set image deploy/scanner \
    scanner=registry.redhat.io/advanced-cluster-security/rhacs-scanner-rhel8:4.7.8
  3. To update the Scanner database image, run the following command:

    $ oc -n stackrox set image deploy/scanner-db \
    db=registry.redhat.io/advanced-cluster-security/rhacs-scanner-db-rhel8:4.7.8 \
    init-db=registry.redhat.io/advanced-cluster-security/rhacs-scanner-db-rhel8:4.7.8

Verification

  • To verify that the new pods have been deployed, run the following commands:

    $ oc get deploy -n stackrox -o wide
    $ oc get pod -n stackrox --watch

3.3.3. Verifying the Central cluster upgrade

After you have upgraded both Central and Scanner, verify that the Central cluster upgrade is complete.

注意

If you use Kubernetes, enter kubectl instead of oc.

Procedure

  • Check the Central logs by running the following command:

    $ oc logs -n stackrox deploy/central -c central

    Example output

    No database restore directory found (this is not an error).
    Migrator: 2023/04/19 17:58:54: starting DB compaction
    Migrator: 2023/04/19 17:58:54: Free fraction of 0.0391 (40960/1048576) is < 0.7500. Will not compact
    badger 2023/04/19 17:58:54 INFO: All 1 tables opened in 2ms
    badger 2023/04/19 17:58:55 INFO: Replaying file id: 0 at offset: 846357
    badger 2023/04/19 17:58:55 INFO: Replay took: 50.324µs
    badger 2023/04/19 17:58:55 DEBUG: Value log discard stats empty
    Migrator: 2023/04/19 17:58:55: DB is up to date. Nothing to do here.
    badger 2023/04/19 17:58:55 INFO: Got compaction priority: {level:0 score:1.73 dropPrefix:[]}
    version: 2023/04/19 17:58:55.189866 ensure.go:49: Info: Version found in the DB was current. We’re good to go!

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部