4.3. Checking deployment YAML files


Procedure

  • Run the following command to check the build-time and deploy-time violations of your security policies in YAML deployment files:

    $ roxctl deployment check --file=<yaml_filename> \
    --namespace=<cluster_namespace> \
    --cluster=<cluster_name_or_id> \
    --verbose

    where:

    <yaml_filename>
    Specifies the YAML file with one or more deployments to send to Central for policy evaluation.
    <cluster_namespace>
    Specifies a namespace to enhance deployments with context information such as network policies, role-based access controls (RBACs), and services for deployments that do not have a namespace in their specification. The namespace defined in the specification is not changed. The default value is default.
    <cluster_name_or_id>
    Specifies the cluster name or ID that you want to use as the context for the evaluation to enable extended deployments with cluster-specific information.
    --verbose
    Specifies that you receive additional information for each deployment during the policy check, including the RBAC permission level and a comprehensive list of applied network policies.

    The format is defined in the API reference. To cause Red Hat Advanced Cluster Security for Kubernetes (RHACS) to re-pull image metadata and image scan results from the associated registry and scanner, add the --force option.

    注意

    To check specific image scan results, you must have a token with both read and write permissions for the Image resource. The default Continuous Integration system role already has the required permissions.

    This command validates the following items:

    • Configuration options in a YAML file, such as resource limits or privilege options
    • Aspects of the images used in a YAML file, such as components or vulnerabilities
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部