이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 10. Using feature gates to develop solutions for your applications
Use feature gates to test new Kubernetes features for potential use in your MicroShift deployments.
10.1. Understanding feature gates for MicroShift 링크 복사링크가 클립보드에 복사되었습니다!
As an application developer for edge computing environments, you can now experiment with upcoming Kubernetes features to evaluate their potential benefits for specific use cases.
By using feature gates, you can test various enhancements that might improve performance in your resource-constrained edge environments. For example, you can try advanced CPU management, enhanced scheduling features, or experimental storage options.
When you trial new features using feature gates, your MicroShift can become unstable or lose data. Enable feature gates only in non-production environments.
When planning to use feature gates for development, consider the following details:
- After you specify feature gates, you cannot update MicroShift.
- If your configuration is not valid, MicroShift can fail to start.
- The Kubernetes components you enable handle feature gate validation.
- Feature gates are disabled by default in MicroShift. After you enable feature gates, you cannot disable them.
10.2. Using feature gates for MicroShift 링크 복사링크가 클립보드에 복사되었습니다!
To use feature gates in your development environment, you must specify them in the config.yaml file or create a configuration snippet file. You must also configure the feature set you want to work with.
-
A
config.yamlconfiguration file takes precedence over built-in settings. Theconfig.yamlfile is read every time the MicroShift service starts. -
Configuration snippet YAMLs take precedence over both built-in settings and the
config.yamlconfiguration file. - After you enable feature gates, you cannot disable them.
Prerequisites
- You installed MicroShift.
-
You installed the OpenShift CLI (
oc). -
You have
sudoprivileges on the MicroShift host.
Procedure
Apply features gates 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. Name itconfig.yamland keep 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. For example,/etc/microshift/config.d/10-feature-gate.yaml.
-
Update the MicroShift
Replace the default values in the
xyzsection of the MicroShift YAML with your valid values, or create a configuration snippet file with the sections you need.Feature gates configuration with example values
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the following configuration rules:
-
You must set the
featureSetfield when configuring feature gates. -
When you use
customNoUpgradefeature, you must set thefeatureSettoCustomNoUpgrade. ThecustomNoUpgradefield is only valid whenfeatureSet: CustomNoUpgrade.
-
You must set the
- Configure any settings required for the feature set you want to work with.
Restart MicroShift to apply the configuration changes by running the following command:
sudo systemctl restart microshift
$ sudo systemctl restart microshiftCopy to Clipboard Copied! Toggle word wrap Toggle overflow