$ oc edit <hosted_cluster_name> -n <hosted_cluster_namespace>
您可以在托管集群中使用特性门启用并非默认特性集一部分的特性。您可以使用托管集群中的特性门启用TechPreviewNoUpgrade
特性集。
您可以通过使用 OpenShift 命令行工具编辑HostedCluster
自定义资源 (CR) 来在托管集群中启用TechPreviewNoUpgrade
特性集。
您已安装 OpenShift 命令行工具 (oc
)。
通过运行以下命令打开要编辑的托管集群上的HostedCluster
CR:
$ oc edit <hosted_cluster_name> -n <hosted_cluster_namespace>
通过在featureSet
字段中输入值来定义特性集。例如:
apiVersion: hypershift.openshift.io/v1beta1
kind: HostedCluster
metadata:
name: <hosted_cluster_name> (1)
namespace: <hosted_cluster_namespace> (2)
spec:
configuration:
featureGate:
featureSet: TechPreviewNoUpgrade (3)
1 | 指定您的托管集群名称。 |
2 | 指定您的托管集群命名空间。 |
3 | 此特性集是当前技术预览特性的子集。 |
启用集群上的 |
保存文件以应用更改。
通过运行以下命令验证托管集群中是否启用了TechPreviewNoUpgrade
特性门:
$ oc get featuregate cluster -o yaml