Skip to Content

Setting Kubernetes Policies

Overview

You can manage access policies (Policy) for Kubernetes clusters managed by the organization. Kubernetes policies are operated as Policy as a Code (PaC) and work based on YAML format. You can not only set cluster resources and API scope to allow access, but also apply detailed policy application scope based on resource tags and user attributes (Attribute) and set accessible IP addresses together.

Editing Policy Code

Administrator > Kubernetes > K8s Access Control > Policies > List Details > Go to Editor Mode

Administrator > Kubernetes > K8s Access Control > Policies > List Details > Go to Editor Mode

  1. Navigate to Administrator > Kubernetes > K8s Access Control > Policies menu.
  2. Click on the Policy to edit policy code from the list.
  3. Click the Go to Editor Mode button on the right of the Detail tab to move to the Code Editor screen.
  4. Modify the desired policy content in the code editor window using the following methods.
    1. You can directly modify the code in the center, and wildcard (”*”) and regular expression (RE2 format ) patterns are supported.
      • Reference: Kubernetes Policy YAML Code Syntax Guide
      • Debug errors in directly modified code through the Errors tab at the bottom. If there are errors in the code, the Errors tab is displayed in red for immediate confirmation.
    2. Check the definition method for each item through the Tips tab at the bottom and reflect it in the code.
    3. Insert or modify content in the code through the buttons on the right.
  5. When the access policy definition is complete, click the activated Save Changes button in the top right to save the policy.
Last updated on