WIP Python Helm Release example
ADD
kubernetes-py-helm-release-wordpress/.gitignore
+*.pyc
+venv/

ADD
kubernetes-py-helm-release-wordpress/Pulumi.yaml
+name: kubernetes-py-helm-release-wordpress
+runtime:
+ name: python
+ options:
+ virtualenv: venv
+description: A minimal installation of the Wordpress Helm chart using Helm Release
+ support

ADD
kubernetes-py-helm-release-wordpress/__main__.py
+# Copyright 2016-2022, Pulumi Corporation. All rights reserved.
+
+"""A Kubernetes Python Pulumi program to deploy a Wordpress chart"""
+
+import pulumi
+from pulumi import Output
+from pulumi_kubernetes.core.v1 import Service
+from pulumi_kubernetes.helm.v3 import Release, ReleaseArgs, RepositoryOptsArgs
+
+# Deploy the bitnami/wordpress chart.
+wordpress = Release(
+ "wpdev",
+ ReleaseArgs(
+ chart="wordpress",
+ repository_opts=RepositoryOptsArgs(
+ repo="https://charts.bitnami.com/bitnami",
+ ),
+ # Force to use ClusterIP so no assumptions on support for LBs etc. is required.
+ version="13.0.6",
+ values={
+ "service": {
+ "type": "ClusterIP",
+ }
+ },
+ ),
+)
+
+srv = Service.get("wpdev-wordpress", Output.concat(wordpress.status.namespace, "/", wordpress.status.name, "-wordpress"))
+# Export the Cluster IP for Wordpress.
+pulumi.export("frontendIP", srv.spec.cluster_ip)
+# Command to run to access the wordpress frontend on localhost:8080
+cmd = Output.concat("kubectl port-forward svc/", srv.metadata.name, " 8080:80")
+pulumi.export("portForwardCommand", cmd)

ADD
kubernetes-py-helm-release-wordpress/requirements.txt
+pulumi>=3.0.0,<4.0.0
+pulumi-kubernetes>=3.0.0,<4.0.0

WIP Python Helm Release example