pulumi/pulumi-kubernetes-operator
关于
用于自动部署 Pulumi Stacks 的 Kubernetes Operator
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Pulumi Kubernetes Operator
A Kubernetes operator that provides a CI/CD workflow for Pulumi stacks using Kubernetes primitives. To learn more about the Pulumi Kubernetes Operator visit the Pulumi documentation.
Overview
What is Pulumi?
Pulumi is an open source infrastructure-as-code tool for creating, deploying, and managing cloud infrastructure in the programming language of your choice. If you are new to Pulumi, please consider visiting the getting started first to familiarize yourself with Pulumi and concepts such as Pulumi stacks and backends.
When To Use the Pulumi Kubernetes Operator?
The Pulumi Kubernetes Operator enables Kubernetes users to create a Pulumi Stack as a first-class Kubernetes API resource, and use the StackController to drive the updates. It allows users to adopt a GitOps workflow for managing their cloud infrastructure using Pulumi. This infrastructure includes Kubernetes resources in addition to over 60 cloud providers including AWS, Azure, and Google Cloud. The operator provides an alternative to Pulumi's other CI/CD integrations such as Github Actions, Gitlab CI, Jenkins etc. See the full list of Pulumi's CI/CD integrations here. Since the Pulumi Kubernetes Operator can be deployed on any Kubernetes cluster, it provides turnkey GitOps functionality for Pulumi users running in self-hosted or restricted settings. The Kubernetes Operator pattern, lends itself nicely to automation scenarios by driving to the specified state and automatically retrying if transient failures are encountered.
Prerequisites
The following steps should be completed before using the operator:
Deploy the Operator
Deploy the operator to a Kubernetes cluster.
You can use an existing cluster, or get started by creating a new managed Kubernetes cluster. We will assume that your target Kubernetes cluster is already created and you have configured kubectl to point to it.
Using Helm
A Helm chart is provided in deploy/helm/pulumi-operator and is also published to Artifact Hub.
helm install --create-namespace -n pulumi-kubernetes-operator pulumi-kubernetes-operator oci://ghcr.io/pulumi/helm-charts/pulumi-kubernetes-operator
Using Pulumi
First, make sure you have installed Pulumi as described in "Download & install Pulumi".
Use the Pulumi program located in deploy/deploy-operator-yaml to install the Operator cluster-wide with default settings.
cd deploy/deploy-operator-yaml
pulumi up
Dev Install
A simple "quickstart" installation manifest is provided for non-production environments.
Install with kubectl:
kubectl apply -f https://raw.githubusercontent.com/pulumi/pulumi-kubernetes-operator/refs/tags/v2.10.1/deploy/quickstart/install.yaml
From Source
To build and install the operator from this repository:
- Build the operator image:
make build-image(producespulumi/pulumi-kubernetes-operator:v2.10.1). - Push or load the image into your cluster's registry.
- Deploy to your current cluster context:
make deploy.
This approach deploys a Kustomization directory located at ./operator/config/default.
Create Pulumi Stack Resources
The following are examples to create Pulumi Stacks in Kubernetes that are managed and run by the operator.
Some of the examples use Pulumi Cloud as a state backend, and require that a Pulumi access token
be stored into a Kubernetes Secret. For example, here's now to create a secret from your PULUMI_ACCESS_TOKEN environment variable.
kubectl create secret generic -n default pulumi-api-secret --from-literal=accessToken=$PULUMI_ACCESS_TOKEN
Examples
Working with sources:
Better together with Pulumi IAC:
Advanced configurations:
Stack CR Documentation
Detailed documentation on Stack Custom Resource is available here.
Program Packages
With Program packages a Program can pull in a component from a Git repository, a registry package, or a local path.
Prometheus Metrics Integration
Details on metrics emitted by the Pulumi Kubernetes Operator as instructions on getting them to flow to Prometheus are available here.
Watching Stacks
- Watching Stacks with k9s gives you a single view of every Stack in a terminal UI, plus keys to request a resync and to open an update in Pulumi Cloud.
- Argo CD health checks teach Argo CD to report Stack health, if Argo CD delivers your Stack resources.
- Troubleshooting covers stuck and failing Stacks.
Development
Check out docs/build.md for more details on building and working with the operator locally.
Releasing
(internal only) Please refer to docs/release.md to create a release.
探索相关项目
加载中…