Skip to content
المشاريع

حول

Examples for using Pkl with Kubernetes

الأنظمة والبنية التحتية

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Pkl/K8s Examples

What’s In This Repo?

The yaml directory contains YAML manifests for the official guestbook Kubernetes example.

The pkl/basic example demonstrates how to

  • convert YAML manifests to Pkl

  • evaluate Pkl manifests back to YAML

  • catch manifest errors during evaluation

  • apply Pkl manifests to Kubernetes.

The pkl/advanced example demonstrates how to manage Pkl manifests for multiple applications, deployment environments, and Kubernetes clusters.

To run the examples, install the Pkl CLI.

Why Pkl/K8s?

Kubernetes requires a lot of YAML configuration. To make a single configuration change, users often need to touch multiple YAML files, which is time-consuming and error-prone. Configuration errors aren’t discovered until the configuration is applied.

Pkl/K8s, a set of Pkl templates derived from Kubernetes' OpenAPI spec, is here to save the day. Writing Kubernetes manifests in Pkl offers the following benefits:

  • Strong local validation that goes beyond Kubernetes' OpenAPI spec.

  • Easy sharing of configuration across applications, environments, and clusters with the AppEnvCluster Pkl template. See the advanced example for details.

  • Great IDE experience with validation, code completion, and direct access to Kubernetes documentation. Requires the Pkl IntelliJ Plugin for JetBrains IDEs (IDEA, GoLand, PyCharm, etc).

The io.k8s.convert Pkl module automatically converts Kubernetes manifests from YAML to Pkl. See the basic example for details.

Still unconvinced? See Comparison for the Pkl team’s perspective on how Pkl compares to other configuration formats and languages,

Where To Get Help?

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…