Este conteúdo não está disponível no idioma selecionado.
Chapter 2. Customizing MicroShift by using the configuration file
Use the MicroShift YAML file to customize your preferences, settings, and parameters.
2.1. Using custom settings Copiar o linkLink copiado para a área de transferência!
To create custom configurations, make a copy of the config.yaml.default
file that is given in the /etc/microshift/
directory, renaming it config.yaml
. Keep this file in the /etc/microshift/
directory, and then you can change supported settings that override the defaults before starting or restarting MicroShift.
If you have just a few changes to make to the default settings, consider using configuration drop-in snippets as an alternative method.
Restart MicroShift after changing any configuration settings to have them take effect. The config.yaml
file is read only when MicroShift starts.
2.1.1. Separate restarts Copiar o linkLink copiado para a área de transferência!
Applications and other optional services used with your MicroShift cluster might also need to be restarted separately to apply configuration changes throughout the cluster. For example, when making changes to certain networking settings, you must stop and restart service and application pods to apply those changes. See each procedure for the task you are completing for more information.
If you add all of the configurations you need at the same time, you can minimize system restarts.
2.1.2. Parameters and values for the MicroShift config.yaml file Copiar o linkLink copiado para a área de transferência!
The following table explains MicroShift configuration YAML parameters and valid values for each:
Field | Type | Description |
---|---|---|
|
| A string that specifies the IP address from which the API server is advertised to members of the cluster. The default value is calculated based on the address of the service network. |
|
|
How long log files are stored before automatic deletion. The default value of |
|
|
By default, when the |
|
| The total number of log files kept. By default, MicroShift retains 10 log files. The oldest is deleted when an excess file is created. You can configure this value. |
|
|
Logs only metadata for read and write requests; does not log request bodies except for OAuth access token requests. If you do not specify this field, the |
|
| Defines externally generated certificates and domain names by using custom certificate authorities. |
|
| The full path to the certificate. |
|
| The full path to the certificate key. |
|
| Optional. Add a list of explicit DNS names. Leading wildcards are allowed. If you do not list names, the implicit names are extracted from the certificates. |
|
Fully qualified domain names (FQDNs), wildcards such as | Subject Alternative Names for API server certificates. SANs indicate all of the domain names and IP addresses that are secured by a certificate. |
|
| Defines the transport later protocol (TLS) used and the cipher suites allowed. Provides security for the exposed MicroShift API server and internal control plane endpoints. |
|
|
Lists the allowed cipher suites that the API server accepts and serves. Defaults to the cipher suites allowed with the TLS specification set in the |
|
|
Specifies the minimum version of TLS to serve from the API server. The default value is |
|
|
Log verbosity. The default value is |
|
| Base domain of the cluster. All managed DNS records are subdomains of this base. |
|
|
By default, |
|
|
A reference to a secret that contains the default certificate that is served by the ingress controller. When routes do not specify their own certificate, The secret must contain the following keys and data:
If you do not set one of these values, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller Any certificate in use is automatically integrated in the MicroShift OAuth server. |
|
|
Authenticates client access to the cluster and services. Mutual TLS authentication is enabled when using these settings. If you do not set values for the |
|
| Optional subfield which specifies a list of regular expressions that are matched against the distinguished name on a valid client certificate to filter requests. Use this parameter to cause the ingress controller to reject certificates based on the distinguished name. The Perl Compatible Regular Expressions (PCRE) syntax is required. If you configure this field, it must contain a valid expression or the MicroShift service fails. At least one pattern must match a client certificate’s distinguished name; otherwise, the ingress controller rejects the certificate and denies the connection. |
|
|
Required subfield that specifies a config map in the |
|
| Required subfield that creates a secure route using reencrypt TLS termination with a custom certificate. You must have a certificate/key pair in PEM-encoded files, where the certificate is valid for the route host. The ingress controller only checks client certificates for edge-terminated and reencrypt TLS routes. Certificates for plain text HTTP or passthrough TLS routes are not checked with this setting. |
|
|
Determines the default HTTP version to be used for ingress. The default value is |
|
|
Specifies when and how the ingress controller sets the
|
|
| Defines a policy for HTTP traffic compression. There is no HTTP compression by default. |
|
|
A list of MIME types to compress. When the list is empty, the ingress controller does not apply any compression. To define a list, use the format of the Content-Type definition in RFC 1341 that specifies the type and subtype of data in the body of a message and the native encoding of the data. For example,
Not all MIME types benefit from compression, but |
|
|
The default value is
|
| IP address, NIC name, or multiple | Value defaults to the entire network of the host. The valid configurable value is a list that can be either a single IP address or NIC name or multiple IP addresses and NIC names. |
|
|
The default value is |
|
|
The default port shown. Configurable. Valid value is a single, unique port in the |
|
|
The default port shown. Configurable. Valid value is a single, unique port in the |
|
| Defines a policy for handling new route claims, such as allowing or denying claims across namespaces. By default, allows routes to claim different paths of the same hostname across namespaces. |
|
|
Describes how hostname claims across namespaces should be handled. The default value is
|
|
| Describes how routes with wildcard policies are handled by the ingress controller.
|
|
|
Router status. The default is |
|
|
Specifies settings for ingress controllers TLS connections. If you do not set one, the default value is based on the |
|
|
Specifies the profile type for the TLS Security. The default value is
When using the |
|
| Specifies the TLS version for ingress controllers.
The minimum TLS version is
|
| Objects | Specifies options for tuning the performance of ingress controller pods. |
|
|
Defines how long a connection is held open while waiting for a client response to the server/backend before closing the connection. The default timeout is |
|
|
Defines how long a connection is held open while waiting for a client response. The default timeout is |
|
An |
Describes how much memory in bytes must be reserved for
|
|
|
Describes how much memory in bytes must be reserved from
|
|
|
The default
|
|
|
The default value is
|
|
|
Defines how long a connection is held open while waiting for a server or backend response to the client before closing the connection. The default timeout is |
|
|
Defines how long a connection is held open while waiting for a server or backend response. The default timeout is |
|
|
Defines the number of threads created per
|
|
| Defines how long the router can hold data to find a matching route. Setting this interval with too short a value can cause the router to revert to the default certificate for edge-terminated clients or re-encrypt routes, even when a better-matching certificate could be used.
|
|
|
Defines how long a tunnel connection, including websockets, are held open while the tunnel is idle. The default timeout is |
| See the MicroShift low-latency instructions | Parameter for passthrough configuration of the kubelet node agent. Used for low-latency configuration. The default value is null. |
|
|
The locations on the file system to scan for |
| IP address block |
A block of IP addresses from which pod IP addresses are allocated. IPv4 is the default network. Dual-stack entries are supported. The first entry in this field is immutable after MicroShift starts. The default range is |
| String |
Deploys the Open Virtual Networking - Kubernetes (OVN-K) network plugin as the default container network interface (CNI) when empty or set to |
|
|
Controls the deployment of the Multus Container Network Interface (CNI). The default status is |
| IP address block |
A block of virtual IP addresses for Kubernetes services. IP address pool for services. IPv4 is the default. Dual-stack entries are supported. The first entry in this field is immutable after MicroShift starts. The default range is |
|
|
The port range allowed for Kubernetes services of type |
|
| The name of the node. The default value is the hostname. If non-empty, this string is used to identify the node instead of the hostname. This value is immutable after MicroShift starts. |
| IPv4 address | The IPv4 address of the node. The default value is the IP address of the default route. |
| IPv6 address | The IPv6 address for the node for dual-stack configurations. Cannot be configured in single stack for either IPv4 or IPv6. The default is an empty value or null. |
|
| The default value is empty. An empty value or null field defaults to LVMS deployment. |
|
|
The default value is null or an empty array. A null or empty array defaults to deploying |
|
The endpoint where telemetry data is sent. No user or private data is included in the metrics reported. The default value is | |
|
|
Telemetry status, which can be |
2.1.3. Configuring the advertise address network flag Copiar o linkLink copiado para a área de transferência!
The apiserver.advertiseAddress
flag specifies the IP address on which to advertise the API server to members of the cluster. This address must be reachable by the cluster. You can set a custom IP address here, but you must also add the IP address to a host interface. Customizing this parameter preempts MicroShift from adding a default IP address to the br-ex
network interface.
If you customize the advertiseAddress
IP address, make sure it is reachable by the cluster when MicroShift starts by adding the IP address to a host interface.
If unset, the default value is set to the next immediate subnet after the service network. For example, when the service network is 10.43.0.0/16
, the advertiseAddress
is set to 10.44.0.0/32
.
2.1.4. Extending the port range for NodePort services Copiar o linkLink copiado para a área de transferência!
The serviceNodePortRange
setting extends the port range available to NodePort services. This option is useful when specific standard ports under the 30000-32767
range need to be exposed. For example, if your device needs to expose the 1883/tcp
MQ Telemetry Transport (MQTT) port on the network because client devices cannot use a different port.
NodePorts can overlap with system ports, causing a malfunction of the system or MicroShift.
Consider the following when configuring the NodePort service ranges:
-
Do not create any NodePort service without an explicit
nodePort
selection. When an explicitnodePort
is not specified, the port is assigned randomly by thekube-apiserver
and cannot be predicted. -
Do not create any NodePort service for any system service port, MicroShift port, or other services you expose on your device
HostNetwork
. Table one specifies ports to avoid when extending the port range:
Expand Table 2.2. Ports to avoid. Port Description 22/tcp
SSH port
80/tcp
OpenShift Router HTTP endpoint
443/tcp
OpenShift Router HTTPS endpoint
1936/tcp
Metrics service for the openshift-router, not exposed today
2379/tcp
etcd port
2380/tcp
etcd port
6443
Kubernetes API
8445/tcp
openshift-route-controller-manager
9537/tcp
cri-o metrics
10250/tcp
kubelet
10248/tcp
kubelet healthz port
10259/tcp
kube scheduler