How to achieve a high-quality developer platform experience based on Kubernetes?

An internal developer platform (or IDP) is the infrastructure that enables development teams to deliver applications faster, easier, and more consistently. Kubernetes itself is a powerful platform, but it introduces too much complexity and functionality to simply be handed over to development teams as an IDP. To expect them to be successful, it is very important to put some safeguards in place that allow them to use K8s effectively without increasing the risks associated with reliability, cost-effectiveness, and security.
 

Although Kubernetes itself is not suitable as an IDP, it is a solid foundation on which to build an IDP. Kubernetes provides many tools for platform engineers, for example, it can build IDPs for developers and provide a more streamlined way to build and run applications. So the question that needs to be considered is how to build a platform that provides a good experience for developers without hindering deployment to production environments . There are some good ways to prevent errors from happening in your cluster by applying security measures using policy and governance, role-based access control (RBAC), and default network policies.
 

The composition of the Kubernetes platform

A Kubernetes-based IDP includes not only Kubernetes, but also the tools and processes developers need. As a security constraint of Kubernetes, IDP also requires the policy and governance you want to establish in Kubernetes. This combination enables you to provide developers with a "golden path" to deploy applications faster. The Kubernetes platform consists of four main parts:

plug-in

Plug-ins are the tools needed to provide default "out of the box" functionality that extends Kubernetes functionality, including DNS, TLS, Ingress, logging, tracing, and more. These tools can be open source projects or software from vendors.
 

Create governance

Kubernetes governance is the process of creating policies, procedures, and a set of standard policies that define and enforce best practices in the Kubernetes platform, as well as resource management, scheduling, escalation, and role-based access control.
 

Enable deployment (CI/CD)

This is how applications come from code into the platform. In an IDP, you create a "golden path" for developers to more easily deploy new applications and services into the platform while remaining efficient and secure .
 

Provide feedback

An important component of the IDP is providing timely feedback to the development team. This part of the platform must include rapid detection and issue notification and integrate with the tools they already use . Developers should also be provided with suggested fix options during the code review process.
 

Governance and strategy: three phases

When you think about how governance and policy are applied in Kubernetes, it's really a process. First, you need to select or create the necessary policies . Next, you need an automated way to identify policy violations and then provide guidance on how to remediate those policy violations . Finally, there needs to be the ability to automatically prevent these violations from entering the cluster.
 

Teams often encounter few initial problems when they start deploying Kubernetes, which means that at this stage the development team has no obvious problems in content, coding and delivery of applications and services. But the platform team later discovered that the development team had overlooked some important security measures to help maintain security and continue to apply best practices. Because in the developer platform, developers can easily deploy what they want, when they want it. Unless someone on the team goes back and manually checks all the settings, there may not be any awareness until something goes wrong.
 

Policies can be automatically applied in Kubernetes using open source policy engines such as Polaris or Open Policy Agent (OPA). Using a solution like this, you can ensure that your configuration is consistent with the policies in your environment, helping you keep everything running smoothly.
 

Choose a strategy

When it comes to starting to use policies to enforce Kubernetes best practices related to cost-effectiveness, security, and reliability, developers often don't know where to start or what to focus on. The best way to get started is to determine what is most important to you , and this is how you create a strategy. If cost is most important to you, then focus on policies that affect cost, such as resource requests and limits. If security is your primary concern, deal with containers running as root or generate network policies. Our advice is to start small, pick one or two strategies that will achieve your goals, and then implement them across the board.
 

Identify, fix and stop breaches

Next, you need to identify the policy violations in your current cluster and start correcting them one by one. Once you've fixed the issues in key categories, you can start enforcing your policies on visits. Once you start enforcing policies and successfully block policy violations you can rest assured that these issues will not pop up again and you can repeat the process for the next set of policies you want to enforce. Then it becomes more efficient and safer.
 

Build a strong IDP

For on-premises developer platforms, applying Kubernetes governance and policies enables you to manage resources efficiently, helping control costs and ensuring your applications get the resources they need to run optimally. It also helps you ensure security and compliance by controlling access and enforcing best practices, and improves reliability and resiliency by establishing standard, automated application deployment and scaling processes. Robust Kubernetes governance and policy are key components of building a secure, efficient, and reliable internal developer platform that meets the needs of developers and the entire organization.
 

Reference link:
https://cloudnativenow.com/features/enable-a-great-kubernetes-developer-platform-experience/

Guess you like

Origin blog.csdn.net/SEAL_Security/article/details/132489612