Security challenges in Kubernetes

26 Oct 2021


Container-based cluster orchestrators have been incepted to deploy and manage whole distributed applications as sets of containers that run across multiple data centers. Their main functionalities are automated management of virtual compute and network infrastructure for running the clusters, setting up of inter-container networks with support for service discovery and fine-grained security firewalls, as well as the automated deployment and management of various types of workloads such as web services, databases and data processing jobs, all uniformly running as portable containers.

Very quickly after the breakthrough of containers, the container orchestration framework Kubernetes has become the de-facto standard for deploying and managing portable container-based clusters. Kubernetes has also become the preferred cluster orchestrator for companies that work with two or more cloud providers in order to realize portable, multi-cloud applications. Kubernetes started as an open-source project that is partially based on Google’s internal cluster orchestrator and later has been donated to the Cloud Native Computing Foundation (CNCF)1. Kubernetes operates according to the declarative configuration management approach, which entails that a user-specified, desired system state is enforced upon an actual system by a controller that detects differences between desired and actual state. In Kubernetes, the desired state is specified and managed using a RESTful API and is composed of various types of resources such as containers, nodes and load balancers. Different controllers exist for the life cycle management of different resources types.

The adoption of Kubernetes has skyrocketed in both the private cloud2 and public cloud3. According to a recent survey of 500 relevant IT professionals4, its adoption rate has spiked during the Corona pandemic: 68% of the respondents said to have increased their use of Kubernetes during the pandemic in order to achieve faster deployment cycles of their new applications. A quarter of respondents said that they achieved a cost reduction of at least 30% on an annual basis as a result of using Kubernetes. Moreover, Kubernetes has increasingly been used to manage compute-intensive workloads. For example, 84% of respondents have used a Kubernetes environment to test or develop AI models and applications.

Two sources of insecurity

A weakness of Kubernetes is however security. In the above survey, 54% of the respondents said that security is the greatest challenge for their organization. Security is difficult to handle because it is not implemented by a single system component but by multiple system layers in the Kubernetes stack (cloud, clusters, containers, and application code).

Misconfigurations are by far the most common cause of Kubernetes-related incidents as reflected in a recent report by StackRox5. Misconfigurations also arise due to inconsistencies between different system layers that each require specific security policies and specific security controllers for enforcing these policies. The amount of security policies is also unfortunately huge as container-based clusters are multi-tenant systems on top of which multiple co-located applications need to be isolated from each other.

Kubernetes also has a large security attack interface as it is composed of and depends on many moving parts that expose specific web services or configuration facilities to external users. The more such accessible and evolvable parts exist, the larger the attack interface becomes, and therefore reducing it is of utmost importance, especially when using Kubernetes for running critical infrastructures such as telecommunications systems. Such critical infrastructure require a system architecture where the number of mutually trusted components is kept as small as possible and the outer shell around these trusted components is watertight. Realizing such a system architecture on top of the quickly evolving Kubernetes eco-system is challenging.

The remainder of this article outlines the specific security challenges that ensue from misconfigurations and the large security attack interface of Kubernetes and presents explored directions in existing R&D activities. Some of these challenges are being investigated by KU Leuven and Ericsson in the context of the Horizon 2020 Marie Skłodowska-Curie Action project 5GhOSTS6 that is developing formally founded building blocks for improving the security of Kubernetes deployments in the edge of 5G networks.

Misconfiguration challenges

With respect to misconfigurations, the following resources of the RESTful Kubernetes API are a source of concern:

Large security attack interface

With respect to the large security attack interface of Kubernetes, different entities in a Kubernetes cluster can be distinguished:

In summary, Kubernetes is being adopted at an increasing rate, resulting in a huge number of Kubernetes deployments world-wide. Kubernetes has however a large security attack interface, which means that it is composed of many application and system components that expose specific web services or configuration facilities to external users. The more such accessible components exist, the more challenging it becomes to ensure security. Another major source of security incidents are misconfigurations and cross-layer inconsistencies in the Kubernetes stack.


Resources

  1. Cloud Native Computing Foundation visit site ↩

  2. Openstack User Survey visit site ↩

  3. why organizations choose a multicloud strategy visit site ↩

  4. kubernetes adoption survey visit site ↩

  5. State of Container and Kubernetes visit site ↩

  6. 5GhOSTS visit site ↩

  7. Kubernetes RBAC: Moving from ‘It’s Complicated’ to ‘In a Relationship visit site ↩

  8. The Kubernetes Authorization Webhook visit site ↩

  9. Introducing Policy As Code: The Open Policy Agent (OPA) visit site ↩

  10. E. Truyen, N. Kratzke, D. Van Landuyt, B. Lagaisse and W. Joosen, “Managing Feature Compatibility in Kubernetes: Vendor Comparison and Analysis,” in IEEE Access, vol. 8, pp. 228420-228439, 2020, doi: 10.1109/ACCESS.2020.3045768. view document ↩

  11. Gatekeeper visit site ↩

  12. Budigiri, Gerald ; Baumann, Christoph ; Mühlberg, Jan Tobias ; Truyen, Eddy ; Joosen, Wouter. IEEE; European Conference on Networks and Communications, Date: 2021/06/08 - 2021/06/11, Location: Porto, Portugal. 2021 Joint European Conference on Networks and Communications & 6G Summit (EuCNC/6G Summit); 2021; pp. 407 - 412 view document ↩

  13. Securing Kubernetes with Trusted Platform Module (TPM) visit site ↩

  14. The Falco Project visit site ↩

  15. Kubernetes Security Vulnerabilities visit site ↩

  16. Vulnerability Details : CVE-2021-3489 visit site ↩