4.2. 使用节点选择器和容限创建项目


使用以下步骤创建带有节点选择器和容限的项目。

注意

您还可以删除安装 Red Hat Quay Operator 和命名空间,或命名空间(在部署时使用)来完成以下步骤。然后,用户可以使用以下注解创建新资源:

流程

  1. 输入以下命令来编辑部署 Red Hat Quay 的命名空间,以及以下注解:

    $ oc annotate namespace <namespace> openshift.io/node-selector='node-role.kubernetes.io/infra='

    输出示例

    namespace/<namespace> annotated
  2. 输入以下命令来获取可用 pod 列表:

    $ oc get pods -o wide

    输出示例

    NAME                                               READY   STATUS      RESTARTS        AGE     IP            NODE                                         NOMINATED NODE   READINESS GATES
    example-registry-clair-app-5744dd64c9-9d5jt        1/1     Running     0               173m    10.130.4.13   stevsmit-quay-ocp-tes-5gwws-worker-c-6xkn7   <none>           <none>
    example-registry-clair-app-5744dd64c9-fg86n        1/1     Running     6 (3h21m ago)   3h24m   10.131.0.91   stevsmit-quay-ocp-tes-5gwws-worker-c-dnhdp   <none>           <none>
    example-registry-clair-postgres-845b47cd88-vdchz   1/1     Running     0               3h21m   10.130.4.10   stevsmit-quay-ocp-tes-5gwws-worker-c-6xkn7   <none>           <none>
    example-registry-quay-app-64cbc5bcf-8zvgc          1/1     Running     1 (3h24m ago)   3h24m   10.130.2.12   stevsmit-quay-ocp-tes-5gwws-worker-a-tk8dx   <none>           <none>
    example-registry-quay-app-64cbc5bcf-pvlz6          1/1     Running     0               3h24m   10.129.4.10   stevsmit-quay-ocp-tes-5gwws-worker-b-fjhz4   <none>           <none>
    example-registry-quay-app-upgrade-8gspn            0/1     Completed   0               3h24m   10.130.2.10   stevsmit-quay-ocp-tes-5gwws-worker-a-tk8dx   <none>           <none>
    example-registry-quay-database-784d78b6f8-2vkml    1/1     Running     0               3h24m   10.131.4.10   stevsmit-quay-ocp-tes-5gwws-worker-c-2frtg   <none>           <none>
    example-registry-quay-mirror-d5874d8dc-fmknp       1/1     Running     0               3h24m   10.129.4.9    stevsmit-quay-ocp-tes-5gwws-worker-b-fjhz4   <none>           <none>
    example-registry-quay-mirror-d5874d8dc-t4mff       1/1     Running     0               3h24m   10.129.2.19   stevsmit-quay-ocp-tes-5gwws-worker-a-k7w86   <none>           <none>
    example-registry-quay-redis-79848898cb-6qf5x       1/1     Running     0               3h24m   10.130.2.11   stevsmit-quay-ocp-tes-5gwws-worker-a-tk8dx   <none>           <none>

  3. 输入以下命令删除可用的 pod:

    $ oc delete pods --selector quay-operator/quayregistry=example-registry -n quay-enterprise

    输出示例

    pod "example-registry-clair-app-5744dd64c9-9d5jt" deleted
    pod "example-registry-clair-app-5744dd64c9-fg86n" deleted
    pod "example-registry-clair-postgres-845b47cd88-vdchz" deleted
    pod "example-registry-quay-app-64cbc5bcf-8zvgc" deleted
    pod "example-registry-quay-app-64cbc5bcf-pvlz6" deleted
    pod "example-registry-quay-app-upgrade-8gspn" deleted
    pod "example-registry-quay-database-784d78b6f8-2vkml" deleted
    pod "example-registry-quay-mirror-d5874d8dc-fmknp" deleted
    pod "example-registry-quay-mirror-d5874d8dc-t4mff" deleted
    pod "example-registry-quay-redis-79848898cb-6qf5x" deleted

    删除 pod 后,它们会自动重新启动,并应调度到专用的基础架构节点。

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部