6 Key Kubernetes DevSecOps Principles: People, Processes, Technology - Part 1
August 04, 2022
Bridgecrew

Container-based application deployment is at its peak, as is the popularity of orchestration platforms like Kubernetes that form the underlying infrastructure for containerized applications. Because of its ability to orchestrate and automate application deployment, scaling, and management, Kubernetes has become the de-facto deployment and orchestration tool for cloud-native applications.

We cannot talk about securing container-based applications without talking about DevSecOps.

This methodology has risen to take advantage of the agility between operations and development teams to create end-to-end security mindfulness. It is an approach that aims to integrate security throughout the application lifecycle to distribute responsibility for security between DevOps and security teams. Traditional security methods don't quite cut it for cloud-native technologies as they happen outside of development processes and primarily take into account the runtime state of resources. That's why automated, built-in security must become a priority within containerized hybrid cloud environments.

Building a DevSecOps strategy requires not only the right tooling but also the right culture. In this 2-part post, we'll introduce you to several principles to keep in mind when developing a Kubernetes infrastructure strategy or improving an existing one.

Key DevSecOps Principles for Kubernetes Infrastructure

When we talk about Kubernetes as a container orchestration platform, we are referring to the loosely coupled set of building blocks that provide mechanisms to deploy, maintain, and scale container applications. Generally speaking, Kubernetes is composed of a set of clusters made up of nodes. There are one or more pods within each node, and each pod consists of one or more containers. The containers are used to host containerized application images.

When we talk about Kubernetes security, we are talking about system-level security mindfulness, combining the security of the application code with the security of the image composition and dependencies, and finally, the configuration of the surrounding Kubernetes infrastructure from the Kubernetes manifests for the deployment to the core components of the cluster itself. This system truly spans development, security, and ops.

The goal of Kubernetes-based DevSecOps strategies should be to align those teams to implement consistent guardrails and automate them across the Kubernetes development lifecycle.

Infrastructure Automation with IaC

Infrastructure as code (IaC) is key to embracing DevSecOps, especially when Kubernetes is involved. Functionally, IaC makes it easier to systematically operate cloud and Kubernetes infrastructure through machine-readable, version controllable templates. In that way, it allows you to manage your cloud infrastructure in the same way that you manage your apps, services, and other code and eliminates the need for manual setup as well as the creation of one-time scripts that you would otherwise need to perform infrastructure changes.

From a security standpoint, IaC templates such as Kubernetes manifests (or more modular components such as Helm charts and Kustomize files) allow for early and automated detection of security misconfigurations. Being able to enforce security best practices such as Kubernetes CIS benchmarks as early as possible is crucial and is enabled in large part by IaC.

Immutability

An important principle for Kubernetes, especially when leveraging IaC, is to understand and strive for immutability. In the realm of infrastructure provisioning, immutability means that system components from container images that have been deployed previously can only be modified at the source and not at runtime.

Functionally, this allows for faster iterations and more frequent updates during which these components are ripped down, updated, tested, verified, and then re-deployed. This approach is also required to incorporate DevSecOps fully and to persist security best practices baked into build-time all the way to runtime. Kubernetes environments can be used to impose security regulations such as limiting the system-level actions that an application is allowed to execute, requiring CPU and memory limits, and blocking the launch of containers.

Integration with CI/CD pipelines

CI/CD pipelines are the heartbeat of agile product organizations, allowing for the automated integration and delivery of software from code development to production deployment.

Continuous integration (CI) is the process of automating building and packaging software. Modern CI tools spin up ephemeral instances to create build artifacts and then spin them down once it's complete. Those ephemeral environments allow for functional testing as well as security scanning—from checking Kubernetes manifests for misconfigurations to identifying known vulnerabilities.

Continuous delivery (CD) is also required to safely and quickly roll out changes to your running Kubernetes workloads by standing up test infrastructure and, in some instances, creating parallel deployment instances for easier switching in case of downtime.

When leveraging IaC and Kubernetes, CI/CD allows for not only greater efficiency and productivity but also a higher level of security when it comes to deploying containerized applications.

Go to: 6 Key Kubernetes DevSecOps Principles: People, Processes, Technology - Part 2

Share this

Industry News

December 06, 2022

The Cloud Native Computing Foundation® (CNCF®), which builds sustainable ecosystems for cloud native software, announced the graduation of Argo, which will join other graduated projects such as Kubernetes, Prometheus, and Envoy.

December 06, 2022

Wib announced API PenTesting-as-a-Service (PTaaS) designed to help organizations proactively cover the latest PCI-DSS 4.0 mandates for testing application security, APIs, and vulnerabilities in Business Logic.

December 05, 2022

Harness announced Harness Cluster Orchestrator to allow customers to optimize their Kubernetes cloud workload costs and realize up to 90% cloud cost savings with Amazon Elastic Compute Cloud (Amazon EC2) Spot instances from Amazon Web Services (AWS).

December 01, 2022

Salesforce introduced a new Automation Everywhere Bundle to accelerate end-to-end workflow orchestration, automate across any system, and embed data and AI-driven workflows anywhere.

December 01, 2022

Weaveworks announced that Flux, the original GitOps project, has graduated in the Cloud Native Computing Foundation (CNCF®).

December 01, 2022

Tigera announced enhancements to its cluster mesh capabilities for managing multi-cluster environments with Calico.

December 01, 2022

CloudBees achieved the Amazon Web Service (AWS) Service Ready Program for Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances.

November 30, 2022

GitLab announced the limited availability of GitLab Dedicated, a new way to use GitLab - as a single-tenant software as a service (SaaS) solution.

November 30, 2022

Red Hat announced an expansion of its open solutions publicly available in AWS Marketplace.

November 30, 2022

Sisense announced the availability of the Sisense CI/CD Git integration module.

November 29, 2022

Codenotary announced TrueSBOM for Serverless, a self-updating Software Bill of Materials (SBOM) for applications running on AWS Lamda, Google Cloud Functions and Microsoft Azure Functions that is made possible by simply adding one line to the application source code.

November 29, 2022

Code Intelligence announced its open-source Command-Line Interface (CLI) tool, CI Fuzz CLI, now allows Java developers to easily incorporate fuzz testing into their existing JUnit setup in order to find functional bugs and security vulnerabilities at scale.

November 29, 2022

Parasoft announced the 2022.2 release of Parasoft C/C++test with support for MISRA C:2012 Amendment 3 and a draft version of MISRA C++ 202x.

November 28, 2022

Kasm Technologies announced the release of Kasm Workspaces v1.12, providing major enhancements to its portfolio of digital workspaces delivering Desktop as a Service (DaaS), Virtualized Desktop Infrastructure (VDI), Remote Browser Isolation (RBI), Open-Source Intelligence Collection (OSINT), Training/Sandboxes, and Containerized Application Streaming (CAS).

November 28, 2022

Cloud4C has achieved Amazon Web Services (AWS) DevOps Competency status.