1.17.2. 解决这个问题:独立订阅内存
安装后,找到订阅 multicluster subscription community operator 的 operator 订阅 CR。运行以下命令:
% oc get sub -n open-cluster-management acm-operator-subscription
编辑 operator 订阅自定义资源,添加
spec.config.resources
.yaml
文件,以定义资源限值。备注:不要创建新的、订阅了同一个多集群订阅社区 operator 的订阅自定义资源。因为两个 operator 订阅都连接到一个 operator,operator Pod 会被
"killed"
并由两个 operator 订阅自定义资源重启。请参阅以下更新的
.yaml
文件示例:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: multicluster-operators-subscription-alpha-community-operators-openshift-marketplace namespace: open-cluster-management spec: channel: release-2.1 config: resources: limits: cpu: 750m memory: 2Gi requests: cpu: 150m memory: 128Mi installPlanApproval: Automatic name: multicluster-operators-subscription source: community-operators sourceNamespace: openshift-marketplace
保存资源后,确保独立订阅 Pod 被重启为有 2GB 内存限制。运行以下命令:
% oc get pods -n open-cluster-management multicluster-operators-standalone-subscription-7c8cbf885f-c94kz -o yaml
apiVersion: v1 kind: Pod ... spec: containers: - image: quay.io/open-cluster-management/multicluster-operators-subscription:community-2.1 ... resources: limits: cpu: 750m memory: 2Gi requests: cpu: 150m memory: 128Mi ... status: qosClass: Burstable