apiVersion: v1
kind: Namespace
metadata:
name: openshift-security-profiles
labels:
openshift.io/cluster-monitoring: "true"
在使用安全配置文件操作符之前,必须确保操作符已部署在集群中。
安全配置文件操作符仅支持 Red Hat Enterprise Linux CoreOS (RHCOS) 工作节点。不支持 Red Hat Enterprise Linux (RHEL) 节点。 |
安全配置文件操作符仅支持 |
您必须具有admin
权限。
在 OpenShift Container Platform Web 控制台中,导航到**操作符** → **OperatorHub**。
搜索安全配置文件操作符,然后单击**安装**。
保留**安装模式**和**命名空间**的默认选择,以确保操作符将安装到openshift-security-profiles
命名空间。
单击**安装**。
要确认安装是否成功
导航到**操作符** → **已安装的操作符**页面。
检查安全配置文件操作符是否已安装在openshift-security-profiles
命名空间中,并且其状态为Succeeded
。
如果操作符未成功安装
导航到**操作符** → **已安装的操作符**页面,并检查Status
列中的任何错误或故障。
导航到**工作负载** → **Pod**页面,并检查openshift-security-profiles
项目中报告问题的任何 Pod 的日志。
您必须具有admin
权限。
定义一个Namespace
对象
namespace-object.yaml
apiVersion: v1
kind: Namespace
metadata:
name: openshift-security-profiles
labels:
openshift.io/cluster-monitoring: "true"
创建Namespace
对象
$ oc create -f namespace-object.yaml
定义一个OperatorGroup
对象
operator-group-object.yaml
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: security-profiles-operator
namespace: openshift-security-profiles
创建OperatorGroup
对象
$ oc create -f operator-group-object.yaml
定义一个Subscription
对象
subscription-object.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: security-profiles-operator-sub
namespace: openshift-security-profiles
spec:
channel: release-alpha-rhel-8
installPlanApproval: Automatic
name: security-profiles-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
创建Subscription
对象
$ oc create -f subscription-object.yaml
如果正在设置全局调度程序功能并启用 |
通过检查以下 CSV 文件来验证安装是否成功
$ oc get csv -n openshift-security-profiles
通过运行以下命令来验证安全配置文件操作符是否正在运行
$ oc get deploy -n openshift-security-profiles