Configure ingress control in MicroShift
To apply detailed ingress control such as timeouts, TLS, and logging in MicroShift, you can update the config.yaml file or add a configuration snippet in the /etc/microshift/config.d/ directory. Replace the default values in the ingress section and restart the service.
|
|
|
-
You installed the OpenShift CLI (
oc). -
You have root access to the node.
-
Your node uses the OVN-Kubernetes Container Network Interface (CNI) plugin.
-
Apply ingress control settings in one of the two following ways:
-
Update the MicroShift
config.yamlconfiguration file by making a copy of the providedconfig.yaml.defaultfile in the/etc/microshift/directory, naming itconfig.yamland keeping it in the source directory. -
Use a configuration snippet to apply the ingress control settings you want. To do this, create a configuration snippet YAML file and put it in the
/etc/microshift/config.d/configuration directory.
-
-
Replace the default values in the
ingresssection of the MicroShift YAML with your valid values, or create a configuration snippet file with the sections you need.Ingress controller configuration fields with default valuesapiServer: # ... ingress: accessLogging: destination: 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-custom clientTLS: allowedSubjectPatterns: [] clientCA: name: "" clientCertificatePolicy: "" defaultHTTPVersion: 1 forwardedHeaderPolicy: Append httpCompression: mimeTypes: - "" httpEmptyRequestsPolicy: Respond httpErrorCodePages: name: "" listenAddress: [] logEmptyRequests: Log ports: http: 80 https: 443 routeAdmissionPolicy: namespaceOwnership: InterNamespaceAllowed wildcardPolicy: WildcardsDisallowed status: Managed tlsSecurityProfile: type: custom: ciphers:[] minTLSVersion:"" intermediate: {} old: {} tuningOptions: clientFinTimeout: 1s clientTimeout: 30s headerBufferBytes: 0 headerBufferMaxRewriteBytes: 0 healthCheckInterval: 5s maxConnections: 0 serverFinTimeout: 1s serverTimeout: 30s threadCount: 4 tlsInspectDelay: 5s tunnelTimeout: 1h # ...See "Ingress controller configuration fields in MicroShift" for more information about each field.
-
Complete any other configurations you require, then start or restart MicroShift by running one the following commands:
$ sudo systemctl start microshift$ sudo systemctl restart microshift
After making ingress configuration changes and restarting MicroShift, you can check the age of the router pod to ensure that changes are applied.
-
To check the status of the router pod, run the following command:
$ oc get pods -n openshift-ingressExample outputNAME READY STATUS RESTARTS AGE router-default-8649b5bf65-w29cn 1/1 Running 0 6m10s