故障排除


Red Hat build of MicroShift 4.13

常见问题故障排除

Red Hat OpenShift Documentation Team

摘要

本文档提供有关如何对 MicroShift 进行故障排除的信息。

第 1 章 检查您已安装了哪个版本

要开始故障排除,请确定您已安装了哪个红帽构建的 MicroShift 版本。

要开始故障排除,您必须知道您的红帽构建的 MicroShift 版本。获取此信息的一种方法是使用 CLI。

流程

  • 运行以下命令来检查版本信息:

    $ microshift version
    Copy to Clipboard Toggle word wrap

    输出示例

    Red Hat build of MicroShift Version: 4.13-0.microshift-e6980e25
    Base OCP Version: 4.13
    Copy to Clipboard Toggle word wrap

1.2. 使用 API 检查红帽构建的 MicroShift 版本

要开始故障排除,您必须知道您的红帽构建的 MicroShift 版本。获取此信息的一种方法是使用 API。

流程

  • 要使用 OpenShift CLI (oc) 获取版本号,请运行以下命令来查看 kube-public/microshift-version 配置映射:

    $ oc get configmap -n kube-public microshift-version -o yaml
    Copy to Clipboard Toggle word wrap

    输出示例

    apiVersion: v1
    data:
      major: "4"
      minor: "10"
      version: 4.10.0-0.microshift-e6980e25
    kind: ConfigMap
    metadata:
      creationTimestamp: "2022-08-08T21:06:11Z"
      name: microshift-version
      namespace: kube-public
    Copy to Clipboard Toggle word wrap

第 2 章 响应重启和安全证书

红帽构建的 MicroShift 在检测到更改后会对系统配置的更改(包括 IP 地址更改、时钟调整和安全证书期限)进行响应并重启。

2.1. IP 地址更改或时钟调整

红帽构建的 MicroShift 依赖于设备 IP 地址和系统范围的时钟设置,以便在运行时保持一致。但是,这些设置偶尔可能会在边缘设备上更改,如 DHCP 或网络时间协议 (NTP) 更新。

当进行此类更改时,一些红帽构建的 MicroShift 组件可能会停止正常工作。为缓解这种情况,红帽构建的 MicroShift 会监控 IP 地址和系统时间,并在检测到任一设置更改时重新启动。

触发时钟更改的阈值是,时间的调整超过 10 秒(早或晚)。网络时间协 议(NTP) 服务会定期执行小的时间调整,这不会造成重启。

2.2. 安全证书生命周期

红帽构建的 MicroShift 证书被分为两个基本组:

  1. 短期证书的有效期为一年。
  2. 长期证书的有效期为 10 年。

大多数服务器或叶证书都是短期的。

一个长期的证书示例是用于 system:admin 用户身份验证的客户端证书,或 kube-apiserver 外部服务证书的证书。

2.2.1. 证书轮转

过期或接近其过期日期的证书需要轮转,以确保继续红帽构建的 MicroShift 操作。当红帽构建的 MicroShift 因任何原因重启时,接近过期的证书会被轮转。当证书被设置为马上过期或已过期,可能会导致自动红帽构建的 MicroShift 重启执行轮转。

注意

如果轮转的证书是证书颁发机构(CA),则其签署的所有证书都会轮转。

2.2.1.1. 短期证书

以下情况描述了在短期证书生命周期内红帽构建的 MicroShift 操作:

  1. 无轮转:

    1. 当短期证书最多已存在 5 个月时,不会发生轮转。
  2. 重启时轮转:

    1. 当短期证书已存在 5 到 8 个月时,它会在红帽构建的 MicroShift 启动或重启时进行轮转。
  3. 自动重启进行轮转:

    1. 当短期证书存在超过 8 个月时,红帽构建的 MicroShift 可以自动重启以轮转并应用新证书。
2.2.1.2. 长期证书

以下情况描述了在长期证书生命周期内红帽构建的 MicroShift 操作:

  1. 无轮转:

    1. 当长期证书存在最多 8.5 年时,不会发生轮转。
  2. 重启时轮转:

    1. 当长期证书存在 8.5 到 9 年时,它会在红帽构建的 MicroShift 启动或重启时进行轮转。
  3. 自动重启进行轮转:

    1. 当长期证书存在超过 9 年时,红帽构建的 MicroShift 可以自动重启以轮转并应用新证书。

法律通告

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat