Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Security Deck
    • All guides
      • Overview
      • System and technical requirements
      • Activating the module KSPM
      • Working with a dashboard
      • Viewing control rules
      • Performing security compliance checks
      • Managing exceptions to control rules
      • Managing rule modes
      • Creating a custom rule
      • Editing a custom rule
      • Deleting a custom rule
  • Pricing policy
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Kubernetes® Security Posture Management (KSPM)
  3. Creating a custom rule

Creating a custom rule

Written by
Yandex Cloud
Updated at November 2, 2026
View in Markdown

To work with custom rules, you need the security-deck.rules.editor role or higher in the workspace.

Security Deck UI
  1. Go to Yandex Security Deck.

  2. In the left-hand panel, select  Rules and exceptions.

  3. At the top of the window, select the workspace.

  4. Navigate to the Kubernetes® tab and click Create rule.

  5. Under Main parameters:

    1. Enter the rule name and description.

    2. Select the Check type, which determines the type of rules that apply to the Kubernetes cluster. Currently only Admission is supported: the rule applies when you create or change a Kubernetes object.

      By default, a new rule is created in the Audit mode. After you create a rule, you can change the mode.

    3. Select the rule criticality.

    4. In the Recommendations field, describe the set of actions required to fix the violation.

  6. Under Policy rules, insert the YAML code of the rule. For Admission type rules, only Kyverno ClusterPolicy is supported. Copy only the rule list itself starting with the - name field (without the the spec or rules fields).

    Click Check to check that the code you entered is correct. The check will also start automatically if you save the rule.

  7. Click Save.

The new rule will appear in the Custom tab. When the rule triggers, the system sends an alert. To view alerts, select Alerts in the left-hand panel or open the KSPM dashboard.

Useful linksUseful links

  • Custom rules
  • Editing a custom rule
  • Deleting a custom rule
  • Custom rule sets

Was the article helpful?

Previous
Managing rule modes
Next
Editing a custom rule
© 2026 Direct Cursus Technology L.L.C.