Editor’s note: For more about the kinds of vulnerabilities Kubernetes presents and how to address them, read our companion article in The Edge.
Since its initial release in 2014, Kubernetes (aka K8s) has become the standard open source container tool for managing software applications. Kubernetes is cost-effective, offers autoscaling, and can run on any infrastructure. Its benefits are why 85% of IT leaders consider Kubernetes “extremely important” to cloud-native strategies. On top of this, 61% of people use Kubernetes to manage their computer application deployment.
Funso Richard, information security officer at Ensemble, tells Dark Reading that “forward-thinking organizations understand the importance of leveraging containerized microservices to develop scalable and reliable applications as an essential digital transformation strategy” — and Kubernetes has become the leading tool used to achieve this strategy, he adds.
However, Kubernetes also comes with security challenges: It’s susceptible to data theft, computational power theft, and denial-of-service (DoS) attacks. Kubernetes’ public components (such as kubelets and API authentication) are widely exploited. And threat actors target infrastructure misconfiguration, unpatched software programs, and poor login credentials to gain unauthorized entry to Kubernetes. The vulnerabilities are also widespread. According to Red Hat’s “2022 State of Kubernetes” security report, 93% of Kubernetes users experienced at least one security incident in the past 12 months.
As DevOps teams continue to grapple with rising Kubernetes security mishaps, here are a few ways to stay ahead of attackers and keep cloud-native environments secure.
Securing Kubernetes With Tools
Kubernetes’ security vulnerability affects its efficiency. For instance, concerns over Kubernetes security caused developers to delay application rollouts in 2022, according to Red Hat. Although Kubernetes provides several benefits in application development and container orchestration, says Richard, inadequate security controls expose the open source tool to serious security concerns like misconfiguration, privilege abuse, data exfiltration, credential compromise, exploited public-facing components, and API vulnerabilities. To address these, several Kubernetes security tools have sprung up, including Kubescape, Kube-bench, Kubeaudit, Kube-hunter, and Kyverno.
Kubescape is an open source security platform from ARMO to protect Kubernetes clusters with capabilities such as risk analysis, security compliance, misconfiguration scanning, CI/CD security, RBAC visualizer, and vulnerabilities scanning. One thing that sets Kubescape apart is its library of robust capabilities that aligns with MITRE ATT&CK and NSA-CISA frameworks, says Richard.
“As I track Kubernetes security offerings — both commercial and non-commercial offerings — I haven’t come across another offering with the same exact components as Kubescape,” agrees Fernando Montenegro, senior principal analyst of cybersecurity infrastructure at Omdia.
Kubescape scans clusters, YAML files, and Helm charts for vulnerabilities either directly or via CI/CD integrations. The idea of scanning infrastructure-as-code (IaC) templates is well-popularized across the industry, says Montenegro. Most IaC scanning is done for cloud resources like Amazon’s CloudFormation, HashiCorp’s Terraform, and others, with Kubernetes scanning being a more specialized use case, he adds.
There are other offerings in the market — like Red Hat’s StackRox (acquired in 2021), Tenable’s Terrascan, and Palo Alto Networks’ Checkov — offering similar capabilities as Kubernetes.
Implementing Best Security Practices in Kubernetes
Richard notes that adherence to cybersecurity fundamentals remains the bedrock of any security effort. While Kubescape is undoubtedly a powerful Kubernetes security tool, he believes developers can effectively secure their Kubernetes clusters by following the basics: implementing proper cluster configuration, pod security standards and policy enforcement, network segmentation, vulnerability scanning, periodic policy reviews, and security audits. “Containers should run with the least privileges and only necessary services, while role-based access controls should be in place to manage user access,” Richard says.
While Montenegro says there are several Kubernetes best practices for DevOps and DevSecOps teams to follow, he notes that the following practices must be top on their priority list:
- Think about security early on: Collaborate with your developers/architects to work through a proper threat modeling.
- Work with embedding security throughout the application lifecycle: Security is an end-to-end process, from providing on-the-spot security advice and functionality for a developer working through the code in their development environment, through making sure security tests are part and parcel of the integration stages, then adding the necessary runtime protections to monitor workloads in production.
- Safely store Kubernetes secrets: Implement features like proper namespace separation, use of role-based access control (RBAC).
As Kubernetes grows in adoption, IT teams can avoid security pitfalls by using tools like Kubescape and StackRox, as well as following the best security practices for securing their critical Kubernetes assets.
Source: www.darkreading.com