# Cluster Security

**1. Benchmark Managed Kubernetes Cluster Feature**

&#x20;1\. Overview of the Benchmark Security Feature\
&#x20;\- To ensure the information security of FPT Cloud Managed Kubernetes clusters, FPT Cloud provides a feature allowing administrators to benchmark the configuration and settings of worker node kubelets according to the Common Baseline recommended by the Center for Internet Security (CIS).

\- CIS Benchmarks are a comprehensive set of security configuration guidelines developed by the Center for Internet Security (CIS). These guidelines provide best practices for the security of systems, services, and software.\
&#x20;\- Test cases are applied to each Kubernetes version and tailored to FPT Cloud's kubelet configuration.\
&#x20;\- Test case results fall into three categories: Pass, Fail, and Warning. Pass indicates the configuration meets the CIS-defined test case requirements. Fail indicates the configuration fails a high-severity test case. Warning indicates the configuration fails a test case, but the severity is low (configurable or non-configurable).\ <br>

&#x20;2\. How to use features on the Unify Portal:

&#x20;\* Note: The feature set to enhance the security of Managed Kubernetes Clusters is integrated after the cluster has successfully started (status "Succeeded (Running)").

&#x20;2.1. Enabling Benchmark Security: Access the FPT Cloud portal at, select the Kubernetes item, click the cluster requiring benchmarking, then navigate to the Security tab followed by the Benchmark Security tab to enable it.

<figure><img src="/files/dykPxNBR3oYotxSlqcQn" alt=""><figcaption></figcaption></figure>

&#x20;When the benchmark job completes successfully, detailed results will be displayed. Users can rerun the benchmark to update the latest results or download the results to their own machine.

<figure><img src="/files/I3uX6xLofIk8NGXjca0z" alt=""><figcaption></figcaption></figure>

&#x20;2.2. Disabling the Benchmark Security Feature

&#x20;Access the FPT Cloud console.fptcloud.com portal, select "Kubernetes," click the cluster requiring benchmarking, select the "Security" tab, then the "Benchmark Security" tab, and confirm deactivation.

<figure><img src="/files/J1Pk0SEu5hNjJgbZccr4" alt=""><figcaption></figcaption></figure>

&#x20;**2. Runtime Security Feature**

&#x20;1\. Overview of Runtime Security Features\
&#x20;\- To ensure the information security of FPT Cloud Managed Kubernetes clusters, FPT Cloud has developed a feature integrating Runtime Security support tools. These tools can detect abnormal behavior within K8S clusters that may pose risks to the runtime layer or worker node kernels.

&#x20;\- Falco is a powerful open-source tool for monitoring and detecting anomalous behavior in container systems and Kubernetes. Falco was developed by Sysdig and is now a project maintained by the CNCF (Cloud Native Computing Foundation). Falco's primary function is to provide "runtime security" to systems by monitoring operating system and container behavior and detecting activities that introduce anomalies or potential risks to the system based on predefined rules.

\
&#x20;\- FPT Cloud offers integration with runtime security features, allowing you to configure detailed alerts on actions via Telegram or Gmail. By utilizing alert channels, Security Runtime ensures security events are detected in a timely manner, enabling administrators to act quickly to protect the system.

&#x20;2\. How to use the feature in Unify Portal:

&#x20;\* Note: The feature set to enhance the security capabilities of Managed Kubernetes Clusters is integrated after the cluster has successfully started (status "Succeeded (Running)").

&#x20;2.1. Falco Engine Integration:

A.       Enable Falco Engine

&#x20;Step 1 : Access the FPT Cloud portal at console.fptcloud.com and select "Kubernetes".

<figure><img src="/files/KLlU26zgXLoLu4oY2XuJ" alt=""><figcaption></figcaption></figure>

&#x20;Step 2: Select the cluster to integrate. Runtime

<figure><img src="/files/Mp5KtjTYJ1XVZnyvuZM9" alt=""><figcaption></figcaption></figure>

&#x20;Step 3: Select the Security tab

&#x20;⟶ *⟶*

&#x20;Select "Runtime Security" and perform "enable".

<figure><img src="/files/PixrKOfw6zL81ZvNneGq" alt=""><figcaption></figcaption></figure>

&#x20;Step 4: Select \[Confirm] to complete.

<figure><img src="/files/imwYEXggkf4yGLwevLSk" alt=""><figcaption></figcaption></figure>

&#x20;Runtime Security has been successfully enabled, but since the alert reception channel is not configured, alerts will not be delivered to users.

&#x20;B. Disable Falco Engine

&#x20;If Runtime Security integration is not required, users can disable the service in the portal.

&#x20;Step 1: Click the button in the \[Enable] state.

<figure><img src="/files/dUCLlpaeY4dnFr8OnwRu" alt=""><figcaption></figcaption></figure>

&#x20;Step 2: Enter the cluster name and click \[Disable].

<figure><img src="/files/w3WlgolKHpmEYbwpjXFX" alt=""><figcaption></figcaption></figure>

&#x20;Result after disabling:

<figure><img src="/files/4nYzIH5QeoowcoHYkWK1" alt=""><figcaption></figcaption></figure>

&#x20;2.2. Integrating Falco UI Features

&#x20;A. Enabling Falco UI

&#x20;Step 1: Select the \[Security] tab. Choose \[Runtime Security] and enable it.

&#x20;Step 2: Enable the UI

&#x20;Step 3: Enter the username and password to access the Falco UI, then click "Confirm" to complete.

&#x20;Step 4: Download the kube-config file and access Lens.

&#x20;⟶ *⟶*

&#x20;Select Network

&#x20;⟶ *⟶*

Select Services

&#x20;⟶ *⟶*

<p align="center"> Filter by Namespace fptcloud-runtime-security</p>

&#x20;Step 5. Select the falco-falcosidekick-ui service and choose \[Forward].

&#x20;Step 6: Enter the port forwarding details and click \[Start] to access

&#x20;Step 7: Enter the username and password set when enabling the service

&#x20;Post-login result:

&#x20;Dashboard screen if a warning appears:

B.      Updating username and password

&#x20;Step 1: Click Edit Rutime

&#x20;Step 2: Edit the username and password, then click "Confirm"

C.      Disable Falco UI

&#x20;To disable Falco UI, select Edit Runtime.

&#x20;⟶ *⟶*

&#x20;Click the Enable button

&#x20;⟶ *⟶*

&#x20;Click Confirm

&#x20;Result of disabling the Falco UI:

&#x20;2.3. Integration of Runtime Security Event Notifications

&#x20;2.3.1. Telegram

&#x20;A. Enabling Runtime Security Event Notifications

&#x20;Step 1: Log in to Telegram and search for BotFather

&#x20;Step 2: Type /newbot and set the bot's name

&#x20;Step 3: Create a group chat to receive notifications

&#x20;Step 4: Enable runtime security event notifications in the Unify Portal

&#x20;Step 5: Select Telegram as the notification channel, enter the ChatID and Token ID, then click Confirm

&#x20;Result after setup:

&#x20;When an anomaly is detected, a warning like the image below will be sent to the user's Telegram.

B. Changing the Notification Receiving Channel via Gmail

&#x20;Note: Before creating a Gmail application token, you must enable "2-Step Verification" on your Google account.

&#x20;Step 1: Access the link to create an application token

&#x20;Step 2: Select \[Edit Runtime]

&#x20;Step 3: Enter the information to receive notifications via Gmail and click "Confirm"

&#x20;Result after setting is complete:

&#x20;If an anomaly occurs, the system will send a warning like the following to Gmail.

&#x20;C. Disable Runtime Security Event Notifications

&#x20;If you do not need to receive notifications via Telegram or Gmail, navigate to the \[Security] tab.

&#x20;⟶ *⟶*

&#x20;Select this option and execute Edit Runtime to disable Runtime Security Event Notification.

&#x20;⟶ *⟶*

&#x20;Click Confirm

<figure><img src="/files/5lZCyNo2f44ahNMzsdyZ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/t65kXh0pNsVx7SHSbiw8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/jAC06ILH3isq5JbWmBIB" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/An56273SLRPmA1Msg6kV" alt=""><figcaption></figcaption></figure>

Disabling "Runtime Security Event Notification" will prevent warnings from appearing even if an anomaly occurs.

&#x20;**3.  Workload Managed Kubernetes Cluster Feature**

&#x20;**1. Overview of Workload Security Features**

&#x20;**1.1. Overview of Configuration Audit**

&#x20;When deploying containerized workloads within a Kubernetes environment, you encounter numerous configuration options related to images, containers, the control plane, and the data plane. Improper configuration can introduce potential security risks. DevOps and platform owners must have the ability to continuously evaluate tools, workloads, and infrastructure against hardening standards and remediate any violations.

&#x20;**1.2. Vulnerability Reports**

The Vulnerability Report provides recently discovered vulnerabilities in container images for specific Kubernetes workloads. This includes a list of OS package and application vulnerabilities, along with a summary grouped by severity.

&#x20;Vulnerability reports provide recently discovered vulnerabilities in container images for specific Kubernetes workloads. This includes a list of vulnerabilities for OS packages and applications, along with a summary grouped by severity.

&#x20;Each namespace has a corresponding vulnerability report where the scan results for image workloads within that namespace are stored.

&#x20;The report contains the following fields:

* &#x20;**Namespace**
* **Summary**
  * **criticalCount:** Number of high-severity vulnerabilities
  * **highCount:** Number of high-risk vulnerabilities
  * **lowCount:** Number of low-risk vulnerabilities
  * **unknownCount:** Number of vulnerabilities with unevaluated severity
* **vulnerabilities:** Details of each vulnerability
  * **ID**
  * **Severity:** Vulnerability urgency level (Critical, High, Low, Unknown)
  * **Title:** Vulnerability name
  * **PrimaryLink:** Link to detailed description of the vulnerability
  * **Score:** Common Vulnerabilities and Exposures (CVE) score. This determines the severity level
    * 0: Unknown
    * 0.1 - 3.9: Low -> Unknown
    * 4.0 - 6.9: Medium
    * 7.0 - 8.9: High
    * 9.0 - 10.0: Critical
  * **Namespace**

&#x20;**1.3. Role-Based Access Control (RBAC) Report**

&#x20;The RBAC assessment report displays the results of Kubernetes RBAC checks performed by configuration audit tools such as Trivy.

&#x20;For example, it checks that a specific role does not grant access to secrets for all groups.

&#x20;Each report is owned by the underlying Kubernetes object and stored in the same namespace.

&#x20;The report contains the following corresponding fields:

* **namespace:** The namespace used to scan roles within K8s workloads
* **summary:** Summary of scan results
  * **criticalCount:** Number of high-severity vulnerabilities
  * **highCount:** Number of high-severity vulnerabilities
  * **mediumCount:** Number of medium-severity vulnerabilities
  * **lowCount**: Number of low-severity vulnerabilities

&#x20;**1.4. Cluster Role-Based Access Control (RBAC) Report**

&#x20;While the RBAC assessment report checks the permissions of roles within the same namespace, the cluster RBAC assessment report consolidates all roles across all namespaces.

&#x20;**1.5. Config Audit Report**

&#x20;The ConfigAuditReport represents checks performed by Trivy on the configuration of each Kubernetes object. For example, it checks whether a container image runs as a non-root user or if resource requests and limits are set for that container. Checks may relate to other resources within the namespace, such as K8s workloads, services, configmaps, roles, and role bindings.

&#x20;The report contains the following corresponding fields:

* **namespace:** The namespace used to scan roles within the K8s workload
* **summary**: Summary of scan results
  * **criticalCount:** Number of high-severity vulnerabilities
  * **highCount:** Number of high-severity vulnerabilities
  * **mediumCount:** Number of medium-severity vulnerabilities
  * **lowCount**: Number of low-severity vulnerabilities

&#x20;**1.6. Cluster Config Audit Report**

&#x20;While the Config Audit Report inspects configurations within the same namespace, the Cluster Config Audit Report comprehensively inspects configurations across multiple namespaces.

&#x20;**1.7. Cluster Infrastructure Assessment Report**

&#x20;The Cluster Infrastructure Assessment Report checks important configurations in the management part of the K8s cluster, such as etcd, apiserver, scheduler, and controller manager.

&#x20;**2. How to Use Features on the Unify Portal**

&#x20;*<mark style="color:red;">**Note:**</mark> <mark style="color:red;"></mark><mark style="color:red;">The set of features that enhance M-FKE security are integrated after the cluster has successfully started (status "Succeeded (Running)").</mark>*

**2.1. Enabling Workload Security Features**

&#x20;Access the FPT Cloud console.fptcloud.com portal, select the Kubernetes item, click the cluster requiring benchmarking, then navigate to the Security tab followed by the Workload Security tab to enable the feature.

<figure><img src="/files/MWiKxAiqD38yhbX2eXlS" alt=""><figcaption></figcaption></figure>

&#x20;Clicking the Enable button displays a form where users can select: the namespaces to scan, the report TTL (Time-to-live), and the scan type to output to the report displayed in the portal.

<figure><img src="/files/zTxj3NS92MsqWJG6QX8G" alt=""><figcaption></figcaption></figure>

<p align="center"> Figure 2. Configuration selection form after enabling the feature</p>

<figure><img src="/files/HSaRmtJK5Zx15SyEO4x4" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 3. Selecting namespaces</p>

<figure><img src="/files/57Tp0N39cGSxMq5uwA9w" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 4. Selecting the scan to run and the report type to display in the portal</p>

<figure><img src="/files/45l2StiE6xMOzNo21dEA" alt=""><figcaption></figcaption></figure>

<p align="center"> Figure 5. Selecting the TTL time (default is 30 minutes) </p>

&#x20;When the workload job completes successfully, detailed results are displayed. Users can rerun the workload to update the latest results.

&#x20;Report display information is shown as follows, along with the display fields described above.

<figure><img src="/files/n5Uz8CVh3YzLNdj5rN8A" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 6. Cluster RBAC Evaluation Report Display Screen</p>

<figure><img src="/files/sGwpUHSWWATC4B7RTBRm" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 7. Config Audit Report display screen</p>

<figure><img src="/files/9r7pXu1drXqsYNlwBROX" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 8. RBAC Evaluation Report Display Screen</p>

<figure><img src="/files/uFr89H5H9aYl2JfOUnWW" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 9. Vulnerability Report Display Screen</p>

<figure><img src="/files/vR7DPxKngBCmh9jn8yEU" alt=""><figcaption></figcaption></figure>

<p align="center">  Figure 10. Cluster Infrastructure Evaluation Report Display Screen</p>

&#x20;**2.2. Disabling Workload Security Features**

&#x20;Access the FPT Cloud console.fptcloud.com portal, select the Kubernetes item, click on the cluster that requires benchmarking, select the Security tab, then the Workload Security tab, and stop the service after confirming.

<figure><img src="/files/fLJDB4xehHo3oWAMMoA6" alt=""><figcaption></figcaption></figure>

&#x20;**4. Audit Logs Functionality for Managed Kubernetes Clusters**

🌟  Audit Logs Security Feature Overview

&#x20;Audit Logs are included in the self-service security feature group provided in the MFKE product's Unify portal. They record all activities and API requests sent to the kube-apiserver. This enables tracking which agent performed what action, when, which objects were affected, and the resulting outcome.

🌟 Benefits of Audit Logs:

* Assists in monitoring the behavior of components interacting with the Kubernetes cluster's API server.
* Provides security analysis and anomaly detection capabilities.
* Supports troubleshooting and compliance adherence.

&#x20;✓ Audit log structure consists of the following information:

<figure><img src="/files/2OTLuOei580sXm3R0Rfc" alt=""><figcaption></figcaption></figure>

&#x20;1️⃣ Request URL: The path of the API called on the kube-apiserver.

* Audit ID: A unique ID for each audit event, used for log tracing.
* Object Reference: Information about the Kubernetes resource that was operated on:
  * &#x20;ApiGroup
  * apiVersion: API version (v1)
  * name: The name of the node
  * namespace
  * resource: Resource type (nodes)

&#x20;2️⃣ Action: The operation performed on the Kubernetes resource. Examples: patch/create/delete/update

&#x20;3️⃣ Username: The name of the account or service performing the action.

&#x20;4️⃣ Request Received: Time the request was recorded by the kube-apiserver (dd-MM-yyyy HH:mm:ss format).

&#x20;5️⃣ Logging Time: The time the event was recorded in the MFKE service's logging system. Typically, Logging Time is later than Request Received. This is because it takes time for logs to be pushed from the cluster's kube-apiserver to the centralized logging system.

&#x20;🌟 How to Use Features in Unify Portal

&#x20;⚠️ Note: The feature set enhancing the security of your Managed Kubernetes Cluster is integrated after the cluster has successfully started (status "Succeeded (Running)").

1\.        Enabling Audit Log Security:\
&#x20;Access the FPT Cloud console.fptcloud.com portal, select the Kubernetes item, click the cluster requiring auditing, then choose the Security tab and Audit Log tab.

![](/files/3q2oYHVyOesY8QovmlQa)\
\
&#x20;Clicking the Audit Log tab automatically runs a query and displays all logs recorded in the past hour. Audit log information is displayed alongside the fields described in step 2 above.

![](/files/NfD9BMDWM3577khB0QAE)<br>

&#x20;

2\.        To search for logs from a different time period, please follow these steps:

a.        Step 1: Click the time picker in the upper-right corner of the screen.

<figure><img src="/files/I9jvZiTnMTSRvm0NqK7M" alt=""><figcaption></figcaption></figure>

b.        Step 2: Enter the time period for which you want to view logs, then click "**Apply Filter".**<br>

<figure><img src="/files/FNtXRqJ1u2F9xQRsFwRh" alt=""><figcaption></figcaption></figure>

&#x20;The system will display all logs recorded during the selected period, sorted in descending order.

&#x20;⚠️ Note:

* You can only filter logs for a maximum period of 3 days (From – To).
* Logs are stored for the past 7 days.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-docs.fptcloud.com/fpt-gpu-cloud/gpu-cluster/managed-k8s-with-gpu-virtual-machine/tutorial/cluster-security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
