{"id":43166,"date":"2020-10-08T00:00:00","date_gmt":"2020-10-08T00:00:00","guid":{"rendered":"https:\/\/www.trendmicro.com\/en_us\/devops\/20\/j\/basics-of-keeping-kubernetes-clusters-secure-pt-2.html"},"modified":"2020-10-08T00:00:00","modified_gmt":"2020-10-08T00:00:00","slug":"basics-of-keeping-kubernetes-clusters-secure-part-2","status":"publish","type":"post","link":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/","title":{"rendered":"Basics of Keeping Kubernetes Clusters Secure Part 2"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.trendmicro.com\/content\/dam\/trendmicro\/global\/en\/devops\/20\/j\/basics-of-keeping-kubernetes-cluster-secure-pt-2\/basics-of-keeping-kubernetes-clusters-secure-pt-2.jpg\"><\/p>\n<div id=\"left-panel-content-block\" readability=\"43.951807228916\">\n<p>By Magno Logan <span>Trend Micro Research<\/span><\/p>\n<p>We outline security mitigations and settings that should be prioritized in a clustered environment. The second part of our security guide on Kubernetes clusters covers best practices related to worker nodes, the kubelet, pods, and audit logs.<\/p>\n<\/p><\/div>\n<div readability=\"209.41830392227\">\n<p>In our <a href=\"https:\/\/www.trendmicro.com\/vinfo\/us\/security\/news\/virtualization-and-cloud\/the-basics-of-keeping-your-kubernetes-cluster-secure-part-1\">previous article<\/a>, we talked about the different ways developers can protect control plane components, including Kube API server configurations, RBAC authorization, and limitations in the communication between pods through network policies.<\/p>\n<p>This time, we focus on best practices that developers can implement to protect worker nodes and their components. We will talk about the kubelet, the pods, and how to set up audit logs to have better visibility into your cluster. At the end, we include a few basic tips that, though they might seem like common sense, still need to be highlighted.<\/p>\n<p>For most of our examples, it should be noted that we will use a kubeadm cluster setup with Kubernetes v1.18.<\/p>\n<hr>\n<h2>The worker nodes<\/h2>\n<p>If the control plane is the brains of the operation, the worker nodes are the muscles. They run and control all the pods and containers from your cluster. You can have zero or more worker nodes on your cluster, although it is not recommended to run your pods on the same node as the control plane. The main components of a Worker are the kubelet, the container runtime interface (which is Docker by default, but could be another), and the kube-proxy. You can see all your nodes, including the primary node, by using this kubectl command: <i>kubectl get nodes<\/i>. The output should be something similar to the following image:<\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig1.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig1.png\" alt=\"The output of the kubectl get nodes command\"><\/a><\/p>\n<p class=\"smallText\">Figure 1. The output of the <i>kubectl get nodes<\/i> command<\/p>\n<p>Let&#8217;s start with the recommended worker nodes configuration files&#8217; ownership and permissions. These are the main files you should monitor for any changes on your Workers, according to the CIS Kubernetes Benchmark v1.5.1:<\/p>\n<div class=\"tableWrapper\">\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody readability=\"5\">\n<tr readability=\"3\">\n<td width=\"339\">\n<p align=\"center\"><b>File or directory<\/b><\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\"><b>Recommended ownership<\/b><\/p>\n<\/td>\n<td width=\"123\" readability=\"5\">\n<p align=\"center\"><b>Recommended permission (or more restrictive)<\/b><\/p>\n<\/td>\n<\/tr>\n<tr readability=\"3\">\n<td width=\"339\" readability=\"5\">\n<p><span lang=\"PT-BR\">\/etc\/systemd\/system\/kubelet.service.d\/10-kubeadm.conf<\/span><\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\">root:root<\/p>\n<\/td>\n<td width=\"123\">\n<p align=\"center\">644<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"339\">\n<p>kube-proxy config file<\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\">root:root<\/p>\n<\/td>\n<td width=\"123\">\n<p align=\"center\">644<\/p>\n<\/td>\n<\/tr>\n<tr readability=\"3\">\n<td width=\"339\" readability=\"5\">\n<p>\/etc\/kubernetes\/kubelet.conf<\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\">root:root<\/p>\n<\/td>\n<td width=\"123\">\n<p align=\"center\">644<\/p>\n<\/td>\n<\/tr>\n<tr readability=\"3\">\n<td width=\"339\" readability=\"5\">\n<p><span lang=\"PT-BR\">certificate authorities file<\/span><\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\">root:root<\/p>\n<\/td>\n<td width=\"123\">\n<p align=\"center\">644<\/p>\n<\/td>\n<\/tr>\n<tr readability=\"3\">\n<td width=\"339\" readability=\"5\">\n<p>\/var\/lib\/kubelet\/config.yaml<\/p>\n<\/td>\n<td width=\"162\">\n<p align=\"center\">root:root<\/p>\n<\/td>\n<td width=\"123\">\n<p align=\"center\">644<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p class=\"smallText\">Table 1. CIS Kubernetes Benchmark v1.5.1 recommendations<\/p>\n<h2>The kubelet<\/h2>\n<p>The kubelet is the agent that runs on each node of your cluster and makes sure that all containers are running in a pod. It is also the agent that makes any configuration changes on the nodes. Although it is not shown on <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/overview\/components\/\" target=\"_blank\" rel=\"noopener\">the main Kubernetes architecture diagram<\/a>, even the Master Node has a kubelet (and a kube-proxy) agent running in case you want to run other pods there, although it is not recommended.<\/p>\n<p>There are two main matters that you need to worry about with regard to your kubelet security settings: restricting the kubelet permissions and rotating the kubelet certificates. Restricting the kubelet permissions can prevent attackers from reading your kubelet credentials after they break out of the container and can do other things in your cluster.<\/p>\n<p>To check for these settings, you can run <i>ps -ef | grep kube-apiserver<\/i> on any of your master node and see what is enabled by default, such as in the image here (Note that we are using the default settings of a kubeadm cluster setup with v1.18.5, so the results here might differ from yours).<\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig2.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig2.png\" alt=\"Command output of the ps -ef | grep kube-apiserver showing the kubelet security settings\"><\/a><\/p>\n<p class=\"smallText\">Figure 2. Command output of the <i>ps -ef | grep kube-apiserver<\/i> showing the kubelet security settings<\/p>\n<h3>RBAC for Kubelet<\/h3>\n<p>From the preceding image, it is observable that the <i>&#8211;authorization-mode<\/i> parameter is already set with the \u201cNode, RBAC\u201d values, which are the ones that are enabled by default. However, this might be different on your cluster, so it is always important to double-check it.<\/p>\n<p>We have not mentioned admission controllers before, but they are pieces of code that can be called during the requests to the Kube API server after the authentication and authorization phase of the request for performing certain validations or changes (also known as mutations). Validation and mutation are two types of admission controllers in Kubernetes. Admission controllers can also be a combination of both. The only difference between them is that mutation controllers can modify the objects while validation cannot.<\/p>\n<p>To check which admission controllers are enabled on your cluster, check for the <i>\u2013enable-admission-plugin<\/i> parameter on your kube-apiserver settings. You can do this by typing this command on your master node: <i>ps -ef | grep kube-apiserver | grep enable-admission-plugins<\/i>. On our testing cluster, the only admission controller enabled by default is the NodeRestriction. This limits the objects that a kubelet can modify, so it limits what secrets can be read by which pods. In doing so, it does not allow the pods to read any secrets in the cluster, except the ones that are attached to their node or the secrets that are allowed to be seen.<\/p>\n<p>To learn more about admission controllers and which ones you can enable, please check the <a href=\"https:\/\/kubernetes.io\/docs\/reference\/access-authn-authz\/admission-controllers\/\" target=\"_blank\" rel=\"noopener\">official Kubernetes documentation<\/a>.<\/p>\n<p>The kubelet agent authenticates the API server using certificates, which are valid for one year. You should also configure the kubelet certification rotation to generate a new key and request a new certificate from the Kubernetes API when the current certificate is close to expiring.<\/p>\n<p>You can find more information on certificate rotation <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/tls\/certificate-rotation\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<h3>The pods<\/h3>\n<p>After protecting the control plane, the worker nodes, and most of the components, it might seem that we\u2019re now safe \u2014 but this isn\u2019t so. As discussed in the <a href=\"https:\/\/www.trendmicro.com\/vinfo\/us\/security\/news\/virtualization-and-cloud\/the-basics-of-keeping-your-kubernetes-cluster-secure-part-1\">first article<\/a>, we always try to apply a defense-in-depth approach to reduce our attack surface and make it harder for attackers to exploit our clusters.<\/p>\n<p>There are three main actions that you can take to ensure the basic level of security for your pods:<\/p>\n<ol readability=\"-0.98169418521177\">\n<li readability=\"0.95096921322691\"><b>Limit resources<\/b>. The last thing you would want to happen on your cluster is for one of your pods to start consuming all the resources available on your node, leaving the other pods with performance issues and possibly causing a denial of service (DoS) on the node. Kubernetes has a solution for that, called ResourceQuotas. You can also define hard and soft limits on the PodSpec, but that becomes hard to manage quickly. Meanwhile, ResourceQuota is an object that allows you to set hard and soft resource limits in a namespace. To enable ResourceQuota, you need to have it set on the kube-apiserver flag <i>\u2013enable-admission-plugins=ResourceQuota<\/i>. You can check your kube-apiserver settings using this command: <i>ps \u2013ef | grep kube-apiserver<\/i>. Here\u2019s a sample of a ResourceQuota object:\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig3.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig3.png\"><\/a><\/p>\n<p class=\"smallText\">Figure 3. Sample ResourceQuota object<\/p>\n<p class=\"sourceText\">Source: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/resource-quotas\/\" target=\"_blank\" rel=\"noopener\">Kubernetes Documentation on Resource Quotas<\/a><\/p>\n<\/li>\n<li><b>Create and apply a security context<\/b>. A security context allows you to define privilege and access control permissions for a pod or a container. Here are a few security controls that you should always use whenever possible:\n<ul>\n<li>AllowPrivilegeEscalation. This controls whether a process can gain more privileges than its parent process. This should be set to false.<\/li>\n<li>ReadOnlyRootFileSystem. This defines whether the container has a read-only root file system or not. The default setting is false, but we recommend that you set it to true.<\/li>\n<li>RunAsNonRoot. This setting indicates if the container must run as a non-root user and should be set to true. As a result of setting this to true, in any event that the container tries to run as a root user (UID 0), the kubelet will validate it and fail to start the container.<\/li>\n<\/ul>\n<\/li>\n<li><b>Use Seccomp, AppArmor, and SELinux<\/b>. These are Linux kernel security features that can also be set up via the SecurityContext. The details of how they work, however, are outside the scope of this article. For more information, you can check The Linux Foundation&#8217;s <a href=\"https:\/\/www.linux.com\/training-tutorials\/overview-linux-kernel-security-features\/\" target=\"_blank\" rel=\"noopener\">overview<\/a>.\n<ul>\n<li>Seccomp. This feature filters the system calls of a process. Currently, it is only available on the alpha version of the API and can be set as such in the SecurityContext object definition: <i>seccomp.security.alpha.kubernetes.io\/pod: runtime\/default<\/i>.<\/li>\n<li>AppArmor. This feature uses program profiles to restrict the capabilities of individual programs: that is, by confining programs to a limited set of resources. It is currently available on the beta version and can be set like so: <br \/><i>container.apparmor.security.beta.kubernetes.io\/container: runtime\/default<\/i>.<\/li>\n<li>SELinux. This enables the SELinux module, which applies security labels to objects and evaluates all security-relevant interactions via the security policy. Here is an example of how to apply it: <br \/>securityContext: <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<i>seLinuxOptions:<\/i> <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>level: &#8220;s0:c123,c456&#8221;<\/i><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>The Pod Security Policy<\/h3>\n<p>A Pod Security Policy (PSP) is an object that can control most of the security settings mentioned previously on the cluster level. To do that, you also need to enable an admission controller called PodSecurityPolicy, which is not enabled by default. Once a PSP is created, you need to authorize the user so that they can use it via RBAC through the ClusterRole and ClusterRoleBinding we mentioned in the <a href=\"https:\/\/www.trendmicro.com\/vinfo\/us\/security\/news\/virtualization-and-cloud\/the-basics-of-keeping-your-kubernetes-cluster-secure-part-1\">first part<\/a> of this series of articles. You can also use Role and RoleBinding, but these will limit the PSP usage to the specific namespace. Here is a list of things you can control on your cluster via the PodSecurityPolicy:<\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig4.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig4.png\" alt=\"A list of what can be controlled on a cluster via PodSecurityPolicy\"><\/a><\/p>\n<p class=\"smallText\">Figure 4. A list of what can be controlled on a cluster via PodSecurityPolicy<\/p>\n<p class=\"sourceText\">Source: <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/policy\/pod-security-policy\/#what-is-a-pod-security-policy\" target=\"_blank\" rel=\"noopener\">Kubernetes documentation on Pod Security Policies<\/a><\/p>\n<p>More examples of PodSecurityPolicies can be seen in the <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/security\/pod-security-standards\/#policy-instantiation\" target=\"_blank\" rel=\"noopener\">official Kubernetes documentation<\/a>.<\/p>\n<h3>The audit logs<\/h3>\n<p>Logs are an important part of a system, especially a complex one such as a Kubernetes cluster. The audit logs can record all the requests made to the Kube API server since it is a central point of communication inside the cluster. Unfortunately, the Kubernetes audit logs are disabled by default since they increase the memory consumption of the API server.<\/p>\n<p>It is your job as the cluster administrator to set this up. We highly recommend that you do that before putting your cluster in production; this will not only help you detect any security issues but will also help your developers with debugging and troubleshooting. To do that, you need to set up at least the first two flags on your kube-apiserver configuration:<\/p>\n<ul>\n<li>&#8211;audit-log-path: Tells the location of the log file where you want Kubernetes to save the logs<\/li>\n<li>&#8211;audit-policy-file: Tells the location of the audit policy file you have defined for your cluster<\/li>\n<li>audit-log-maxage: Tells the number of days to retain the audit log file<\/li>\n<li>&#8211;audit-log-maxbackup: Tells the number of audit log files to save as backup<\/li>\n<li>&#8211;audit-log-maxsize: Tells the size of each audit log file before it gets rotated<\/li>\n<\/ul>\n<p>The way to do that is by creating an audit policy object that defines what events should be recorded and which data should be collected. You can have different logging levels for different resources on your cluster. There are four known audit levels for the policy:<\/p>\n<ul>\n<li>None. No events that match will be logged<\/li>\n<li>Metadata. Only logs request metadata, not the request or response body<\/li>\n<li>Request. Logs request metadata and request body, but not the response<\/li>\n<li>RequestResponse. Logs event metadata, request, and response body<\/li>\n<\/ul>\n<p>This is a basic example of an audit policy that logs all the request metadata:<\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig5.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig5.png\" alt=\"Sample audit policy for logging all request metadata\"><\/a><\/p>\n<p class=\"smallText\">Figure 5. Sample audit policy for logging all request metadata<\/p>\n<p>Now that you have a policy, how do you tell Kubernetes to start logging the data? To do so, you&#8217;ll need to apply the changes made to the <i>kube-apiserver.yaml<\/i> file. One last thing to remember is that if the kube-apiserver is deployed as a Pod, you need to mount the hostPath with the location of the log and the policy files.<\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig6-a.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig6-a.png\" alt=\"Sample of mounted volumes\"><\/a><\/p>\n<p><a href=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig6-b.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/documents.trendmicro.com\/images\/TEx\/articles\/kubernetes-cluster-security-p2-fig6-b.png\" alt=\"sample of mounted hostPath\"><\/a><\/p>\n<p class=\"smallText\">Figure 6. Sample of mounted volumes (top); sample of mounted hostPath (bottom)<\/p>\n<p class=\"sourceText\">Source: <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug-application-cluster\/audit\/#log-backend\" target=\"_blank\" rel=\"noopener\">Kubernetes documentation on auditing and log backend<\/a><\/p>\n<p>Additionally, we emphasize the following because we believe that it is very important to do it: Please consider enabling audit logs on your cluster. Still, don\u2019t forget to have a proper policy for it; otherwise, you will run out of space quickly.<\/p>\n<p>More information about auditing Kubernetes can be found in the <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/debug-application-cluster\/audit\/\" target=\"_blank\" rel=\"noopener\">official documentation<\/a>. You can also check out this great <a href=\"https:\/\/www.youtube.com\/watch?v=raJRLmGb9Is\" target=\"_blank\" rel=\"noopener\">presentation on audit logs<\/a> made by Datadog during KubeCon NA 2019.<\/p>\n<p>Here\u2019s one quick tip: If you have <a href=\"https:\/\/www.trendmicro.com\/en_us\/business\/products\/hybrid-cloud\/deep-security-for-cloud.html\">Trend Micro<sup>TM<\/sup> Deep Security<sup>TM<\/sup><\/a> or <a href=\"https:\/\/www.trendmicro.com\/en_ph\/business\/products\/hybrid-cloud.html\">Trend Micro Cloud One<sup>TM<\/sup><\/a> agent installed on your nodes, make sure to check if you have enabled these Intrusion Prevention System (IPS) rules to detect any changes on your cluster and protect it from known Kubernetes vulnerabilities and attacks:<\/p>\n<ul>\n<li>1009450 \u2013 Kubernetes API Proxy Request Handling Privilege Escalation Vulnerability (CVE-2018-1002105)<\/li>\n<li>1009493 \u2013 Kubernetes Dashboard Authentication Bypass Information Disclosure Vulnerability (CVE-2018-18264)<\/li>\n<li>1009561 \u2013 Kubernetes API Server Denial of Service Vulnerability (CVE-2019-1002100)<\/li>\n<\/ul>\n<p>These Integrity Monitoring (IM) rules monitor both the Master and Worker nodes&#8217; main files and processes for any suspicious changes and alert them:<\/p>\n<ul>\n<li>1009060 \u2013 Kubernetes Cluster Master<\/li>\n<li>1009434 \u2013 Kubernetes Cluster Node<\/li>\n<\/ul>\n<p>The following Log Inspection (LI) rule checks the logs of the Kubernetes Master Node components and alerts them based on different events.<\/p>\n<ul>\n<li>1009105 \u2013 Kubernetes Control Plane<\/li>\n<\/ul>\n<h3>The basics of securing Kubernetes clusters<\/h3>\n<p>Lastly, always remember the basics. Aside from applying the aforementioned measures to protect your Kubernetes environment, do not forget some basic housekeeping rules for your day-to-day work with clusters:<\/p>\n<ul>\n<li>Update your Kubernetes environment version early and often through <i>kubectl update<\/i>. Apply this on a test environment before applying in production.<\/li>\n<li>Do not use the admin user for your daily work; the admin should only be used by continuous integration and continuous deployment (CI\/CD) tools.<\/li>\n<li>Unless you have any business or compliance restrictions, consider using managed services such as <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/kubernetes-service\/\" target=\"_blank\" rel=\"noopener\">Azure Kubernetes Service (AKS)<\/a>, <a href=\"https:\/\/aws.amazon.com\/eks\/\" target=\"_blank\" rel=\"noopener\">Amazon Elastic Kubernetes Service (Amazon EKS)<\/a>, or <a href=\"https:\/\/cloud.google.com\/kubernetes-engine\" target=\"_blank\" rel=\"noopener\">Google Kubernetes Engine (GKE)<\/a> as they usually have better defaults for your security posture and the costs for maintaining the control plane are very low.<\/li>\n<li>Apply the security best practices outlined in the <a href=\"https:\/\/www.cisecurity.org\/benchmark\/kubernetes\/\" target=\"_blank\" rel=\"noopener\">CIS Benchmark documents for Kubernetes<\/a>, which have been developed and accepted by different industries.<\/li>\n<li>Check out, star, and fork our Awesome K8s Security List on <a href=\"https:\/\/github.com\/magnologan\/awesome-k8s-security\" target=\"_blank\" rel=\"noopener\">GitHub<\/a><\/li>\n<\/ul><\/div>\n<p>Read More <a href=\"https:\/\/www.trendmicro.com\/en_us\/devops\/20\/j\/basics-of-keeping-kubernetes-clusters-secure-pt-2.html\">HERE<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We outline security mitigations and settings that should be prioritized in a clustered environment. The second part of our security guide on Kubernetes clusters covers best practices related to worker nodes, the kubelet, pods, and audit logs. Read More HERE&#8230;<\/p>\n","protected":false},"author":2,"featured_media":43167,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_layout":"default_layout","footnotes":""},"categories":[61],"tags":[9503,9600,9618,9608],"class_list":["post-43166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trendmicro","tag-trend-micro-devops-article","tag-trend-micro-devops-kubernetes","tag-trend-micro-devops-research","tag-trend-micro-devops-serverless-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News<\/title>\n<meta name=\"description\" content=\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security &amp; Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News\" \/>\n<meta property=\"og:description\" content=\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security &amp; Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"ThreatsHub Cybersecurity News\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-08T00:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"508\" \/>\n\t<meta property=\"og:image:height\" content=\"85\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"TH Author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@threatshub\" \/>\n<meta name=\"twitter:site\" content=\"@threatshub\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TH Author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/\"},\"author\":{\"name\":\"TH Author\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/person\\\/12e0a8671ff89a863584f193e7062476\"},\"headline\":\"Basics of Keeping Kubernetes Clusters Secure Part 2\",\"datePublished\":\"2020-10-08T00:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/\"},\"wordCount\":2306,\"publisher\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/basics-of-keeping-kubernetes-clusters-secure-part-2.png\",\"keywords\":[\"Trend Micro DevOps : Article\",\"Trend Micro DevOps : Kubernetes\",\"Trend Micro DevOps : Research\",\"Trend Micro DevOps : Serverless Security\"],\"articleSection\":[\"TrendMicro\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/\",\"name\":\"Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/basics-of-keeping-kubernetes-clusters-secure-part-2.png\",\"datePublished\":\"2020-10-08T00:00:00+00:00\",\"description\":\"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/basics-of-keeping-kubernetes-clusters-secure-part-2.png\",\"contentUrl\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/basics-of-keeping-kubernetes-clusters-secure-part-2.png\",\"width\":508,\"height\":85},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/basics-of-keeping-kubernetes-clusters-secure-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trend Micro DevOps : Article\",\"item\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/tag\\\/trend-micro-devops-article\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Basics of Keeping Kubernetes Clusters Secure Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\",\"name\":\"ThreatsHub Cybersecurity News\",\"description\":\"%%focuskw%% Threat Intel \u2013 Threat Intel Services \u2013 CyberIntelligence \u2013 Cyber Threat Intelligence - Threat Intelligence Feeds - Threat Intelligence Reports - CyberSecurity Report \u2013 Cyber Security PDF \u2013 Cybersecurity Trends - Cloud Sandbox \u2013- Threat IntelligencePortal \u2013 Incident Response \u2013 Threat Hunting \u2013 IOC - Yara - Security Operations Center \u2013 SecurityOperation Center \u2013 Security SOC \u2013 SOC Services - Advanced Threat - Threat Detection - TargetedAttack \u2013 APT \u2013 Anti-APT \u2013 Advanced Protection \u2013 Cyber Security Services \u2013 Cybersecurity Services -Threat Intelligence Platform\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\"},\"alternateName\":\"Threatshub.org\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#organization\",\"name\":\"ThreatsHub.org\",\"alternateName\":\"Threatshub.org\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Threatshub_Favicon1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Threatshub_Favicon1.jpg\",\"width\":432,\"height\":435,\"caption\":\"ThreatsHub.org\"},\"image\":{\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/threatshub\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.threatshub.org\\\/blog\\\/#\\\/schema\\\/person\\\/12e0a8671ff89a863584f193e7062476\",\"name\":\"TH Author\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g\",\"caption\":\"TH Author\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News","description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News","og_description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","og_url":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/","og_site_name":"ThreatsHub Cybersecurity News","article_published_time":"2020-10-08T00:00:00+00:00","og_image":[{"width":508,"height":85,"url":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png","type":"image\/png"}],"author":"TH Author","twitter_card":"summary_large_image","twitter_creator":"@threatshub","twitter_site":"@threatshub","twitter_misc":{"Written by":"TH Author","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#article","isPartOf":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/"},"author":{"name":"TH Author","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/person\/12e0a8671ff89a863584f193e7062476"},"headline":"Basics of Keeping Kubernetes Clusters Secure Part 2","datePublished":"2020-10-08T00:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/"},"wordCount":2306,"publisher":{"@id":"https:\/\/www.threatshub.org\/blog\/#organization"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png","keywords":["Trend Micro DevOps : Article","Trend Micro DevOps : Kubernetes","Trend Micro DevOps : Research","Trend Micro DevOps : Serverless Security"],"articleSection":["TrendMicro"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/","url":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/","name":"Basics of Keeping Kubernetes Clusters Secure Part 2 2026 | ThreatsHub Cybersecurity News","isPartOf":{"@id":"https:\/\/www.threatshub.org\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png","datePublished":"2020-10-08T00:00:00+00:00","description":"ThreatsHub Cybersecurity News | ThreatsHub.org | Cloud Security & Cyber Threats Analysis Hub. 100% Free OSINT Threat Intelligent and Cybersecurity News.","breadcrumb":{"@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#primaryimage","url":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png","contentUrl":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2021\/10\/basics-of-keeping-kubernetes-clusters-secure-part-2.png","width":508,"height":85},{"@type":"BreadcrumbList","@id":"https:\/\/www.threatshub.org\/blog\/basics-of-keeping-kubernetes-clusters-secure-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.threatshub.org\/blog\/"},{"@type":"ListItem","position":2,"name":"Trend Micro DevOps : Article","item":"https:\/\/www.threatshub.org\/blog\/tag\/trend-micro-devops-article\/"},{"@type":"ListItem","position":3,"name":"Basics of Keeping Kubernetes Clusters Secure Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.threatshub.org\/blog\/#website","url":"https:\/\/www.threatshub.org\/blog\/","name":"ThreatsHub Cybersecurity News","description":"%%focuskw%% Threat Intel \u2013 Threat Intel Services \u2013 CyberIntelligence \u2013 Cyber Threat Intelligence - Threat Intelligence Feeds - Threat Intelligence Reports - CyberSecurity Report \u2013 Cyber Security PDF \u2013 Cybersecurity Trends - Cloud Sandbox \u2013- Threat IntelligencePortal \u2013 Incident Response \u2013 Threat Hunting \u2013 IOC - Yara - Security Operations Center \u2013 SecurityOperation Center \u2013 Security SOC \u2013 SOC Services - Advanced Threat - Threat Detection - TargetedAttack \u2013 APT \u2013 Anti-APT \u2013 Advanced Protection \u2013 Cyber Security Services \u2013 Cybersecurity Services -Threat Intelligence Platform","publisher":{"@id":"https:\/\/www.threatshub.org\/blog\/#organization"},"alternateName":"Threatshub.org","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.threatshub.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.threatshub.org\/blog\/#organization","name":"ThreatsHub.org","alternateName":"Threatshub.org","url":"https:\/\/www.threatshub.org\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2025\/05\/Threatshub_Favicon1.jpg","contentUrl":"https:\/\/www.threatshub.org\/blog\/coredata\/uploads\/2025\/05\/Threatshub_Favicon1.jpg","width":432,"height":435,"caption":"ThreatsHub.org"},"image":{"@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/threatshub"]},{"@type":"Person","@id":"https:\/\/www.threatshub.org\/blog\/#\/schema\/person\/12e0a8671ff89a863584f193e7062476","name":"TH Author","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/066276f086d5155df79c850206a779ad368418a844da0182ce43f9cd5b506c3d?s=96&d=mm&r=g","caption":"TH Author"}}]}},"_links":{"self":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts\/43166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/comments?post=43166"}],"version-history":[{"count":0,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/posts\/43166\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/media\/43167"}],"wp:attachment":[{"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/media?parent=43166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/categories?post=43166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.threatshub.org\/blog\/wp-json\/wp\/v2\/tags?post=43166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}