1.2. MicroShift 配置文件


在启动时,MicroShift 会检查系统范围的 /etc/microshift/ 目录,以获取名为 config.yaml 的配置文件。如果目录中不存在配置文件,则使用内置默认值来启动服务。

您必须使用 MicroShift 配置文件与主机(有时、应用程序和服务设置)结合使用。在调整 MicroShift 节点的设置时,请确保在 tandem 中配置每个功能。

为方便起见,会自动安装您的输入的 config.yaml.default 文件。

1.2.1. 默认设置

重要

MicroShift 的通用设备插件只是一个技术预览功能。技术预览功能不受红帽产品服务等级协议(SLA)支持,且功能可能并不完整。红帽不推荐在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。

有关红帽技术预览功能支持范围的更多信息,请参阅技术预览功能支持范围

如果您没有创建 config.yaml 文件或使用配置片断 YAML 文件,则会使用默认值。以下示例显示了默认配置设置。

  • 要查看默认值,请运行以下命令:

    $ microshift show-config
    Copy to Clipboard Toggle word wrap

    YAML 格式输出的默认值

    apiServer:
      advertiseAddress: 10.44.0.0/32 
    1
    
      auditLog:
        maxFileAge: 0
        maxFileSize: 200
        maxFiles: 10
        profile: Default
      namedCertificates:
        - certPath: ""
          keyPath: ""
          names:
            - ""
      subjectAltNames: []
      tls:
        cipherSuites:
        minVersion: VersionTLS12
    debugging:
      logLevel: "Normal"
    dns:
      baseDomain: microshift.example.com
    etcd:
      memoryLimitMB: 0
    genericDevicePlugin:
        devices:
            - groups:
                - count: 1
                  paths:
                    - limit: 1
                      mountPath: /dev/ttyACM0
                      path: /dev/ttyACM0
                      permissions: mrw
                      readOnly: false
                      type: Device
                  usbs:
                    - product: ""
                      serial: ""
                      vendor: ""
              name: serial
        domain: device.microshift.io
        status: Disabled
    ingress:
      accessLogging:
        destination:
          type:
          container:
            maxLength: 1024
          syslog:
            address: ""
            facility: ""
            maxLength: 1024
            port: 0
            type: ""
        httpCaptureCookies:
          - matchType: ""
            maxLength: 0
            name: ""
            namePrefix: ""
        httpCaptureHeaders:
          request:
            - maxLength: 0
              name: ""
          response:
            - maxLength: 0
              name: ""
        httpLogFormat: ""
        status: Disabled
      certificateSecret: router-certs-default
      clientTLS:
        allowedSubjectPatterns:
        clientCA:
          name: ""
        clientCertificatePolicy: ""
      defaultHTTPVersion: 1
      forwardedHeaderPolicy: ""
      httpCompression:
        mimeTypes:
          - ""
      httpEmptyRequestsPolicy: Respond
      httpErrorCodePages:
          name: ""
      listenAddress: []
      logEmptyRequests: Log
      ports:
        http: 80
        https: 443
      routeAdmissionPolicy:
        namespaceOwnership: InterNamespaceAllowed
        wildcardPolicy: WildcardPolicyAllowed
      status: Managed
      tlsSecurityProfile:
        type: Intermediate
      tuningOptions:
          clientFinTimeout: "1s"
          clientTimeout: "30s"
          headerBufferBytes: 0
          headerBufferMaxRewriteBytes: 0
          healthCheckInterval: "5s"
          maxConnections: 0
          serverFinTimeout: "1s"
          serverTimeout: "30s"
          threadCount: 0
          tlsInspectDelay: "5s"
          tunnelTimeout: "1h"
    kubelet:
    manifests:
      kustomizePaths:
        - /usr/lib/microshift/manifests
        - /usr/lib/microshift/manifests.d/*
        - /etc/microshift/manifests
        - /etc/microshift/manifests.d/*
    network:
      clusterNetwork:
        - 10.42.0.0/16
      cniPlugin: ""
      multus:
        status: Disabled 
    2
    
      serviceNetwork:
        - 10.43.0.0/16
      serviceNodePortRange: 30000-32767
    node:
      hostnameOverride: ""
      nodeIP: "" 
    3
    
      nodeIPv6: ""
    storage:
      driver: "" 
    4
    
      optionalCsiComponents: 
    5
    
        - ""
    telemetry:
      endpoint: https://infogw.api.openshift.com
      proxy: ""
      status: Enabled
    Copy to Clipboard Toggle word wrap

    1
    根据服务网络的地址计算。
    2
    控制 Multus Container Network Interface (CNI)的部署。
    3
    默认路由的 IP 地址。
    4
    默认 null 值部署逻辑卷管理器存储(LVMS)。
    5
    默认 null 值部署 snapshot-controller
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat