22
33# Wordpress Helm Chart
44
5- Uses the Helm API of ` @pulumi/kubernetes ` to deploy ` v2.1.3 ` of the Wordpress Helm Chart to a
6- Kubernetes cluster. ** The Tiller server is not required to be installed.** Pulumi will expand the
7- Helm Chart and submit the expanded YAML to the cluster.
8-
9- > ** NOTE:** Because Tiller is not used, it is important to be aware that a small number of Charts
10- > depend on values that can only be expanded on the server. These variables will get default values
11- > instead.
12-
13- > ** NOTE:** This example has a dependency on the ` helm ` CLI. ** Be sure to install that first!** See
14- > instructions below.
5+ Uses the Helm API of ` @pulumi/kubernetes ` to deploy ` v9.6.0 ` of the Wordpress Helm Chart to a
6+ Kubernetes cluster. Pulumi will expand the Helm Chart and submit the expanded YAML to the cluster.
157
168![ wordpress] ( images/deploy.gif " Wordpress Helm Chart deployment ")
179
1810## Running the App
1911
20- Use the [ Helm installation guide] ( https://helm.sh/docs/intro/install/ ) to install the
21- ` helm ` CLI. On macOS this might look something like:
22-
23- ``` sh
24- brew install helm
25- ```
26-
2712If you haven't already, follow the steps in [ Pulumi Installation and
2813Setup] ( https://www.pulumi.com/docs/get-started/install/ ) and [ Configuring Pulumi
29- Kubernetes] ( https://www.pulumi.com/docs/intro/cloud-providers/kubernetes/setup/ ) to get setup with
14+ Kubernetes] ( https://www.pulumi.com/docs/intro/cloud-providers/kubernetes/setup/ ) to get set up with
3015Pulumi and Kubernetes.
3116
3217Now, install dependencies:
@@ -42,41 +27,53 @@ $ pulumi stack init
4227Enter a stack name: wordpress-dev
4328```
4429
45- Preview the deployment of the application.
46-
47- > ** TIP:** This example installs the Wordpress Chart. You can use ` helm search ` to find other Helm
48- > charts, as well as available versions for them.
49-
50- Perform the deployment:
30+ Preview the deployment of the application and the perform the deployment:
5131
5232``` sh
53- $ pulumi up
54- Updating stack ' wordpress-dev'
55- Performing changes:
56-
57- Type Name Status Info
58- + pulumi:pulumi:Stack wordpress-wordpress-dev created 1 warning
59- + └─ kubernetes:helm.sh:Chart wpdev created
60- + ├─ kubernetes:core:ConfigMap wpdev-mariadb created
61- + ├─ kubernetes:core:ConfigMap wpdev-mariadb-tests created
62- + ├─ kubernetes:core:Secret wpdev-mariadb created
63- + ├─ kubernetes:core:Secret wpdev-wordpress created
64- + ├─ kubernetes:core:Service wpdev-wordpress created 1 warning, 2 info messages
65- + ├─ kubernetes:core:Service wpdev-mariadb created 1 warning, 1 info message
66- + ├─ kubernetes:core:Pod wpdev-credentials-test created 17 warnings
67- + ├─ kubernetes:core:Pod wpdev-mariadb-test-mgjjy created 32 warnings
68- + ├─ kubernetes:core:PersistentVolumeClaim wpdev-wordpress created
69- + ├─ kubernetes:apps:StatefulSet wpdev-mariadb created
70- + └─ kubernetes:extensions:Deployment wpdev-wordpress created
71-
72- ---outputs:---
73- frontendIp: " 35.193.210.254"
74-
75- info: 13 changes performed:
76- + 13 resources created
77- Update duration: 1m28.601219022s
78-
79- Permalink: https://app.pulumi.com/hausdorff/wordpress-dev/updates/1
33+ pulumi up
34+ Previewing update (ts-helm-wordpress)
35+
36+ View Live: https://app.pulumi.com/example/wordpress/ts-helm-wordpress/previews/cc683bd2-1e19-49c9-8a88-792c44e3b020
37+
38+ Type Name Plan
39+ + pulumi:pulumi:Stack wordpress-ts-helm-wordpress create
40+ + └─ kubernetes:helm.sh:Chart wpdev create
41+ + ├─ kubernetes:core:Secret default/wpdev-mariadb create
42+ + ├─ kubernetes:core:Secret wpdev-wordpress create
43+ + ├─ kubernetes:core:Service default/wpdev-mariadb create
44+ + ├─ kubernetes:core:Service wpdev-wordpress create
45+ + ├─ kubernetes:core:ConfigMap default/wpdev-mariadb create
46+ + ├─ kubernetes:core:PersistentVolumeClaim wpdev-wordpress create
47+ + ├─ kubernetes:apps:StatefulSet default/wpdev-mariadb create
48+ + └─ kubernetes:apps:Deployment wpdev-wordpress create
49+
50+ Resources:
51+ + 10 to create
52+
53+ Do you want to perform this update? yes
54+ Updating (ts-helm-wordpress)
55+
56+ View Live: https://app.pulumi.com/example/wordpress/ts-helm-wordpress/updates/7
57+
58+ Type Name Status
59+ + pulumi:pulumi:Stack wordpress-ts-helm-wordpress created
60+ + └─ kubernetes:helm.sh:Chart wpdev created
61+ + ├─ kubernetes:core:Secret default/wpdev-mariadb created
62+ + ├─ kubernetes:core:Secret wpdev-wordpress created
63+ + ├─ kubernetes:core:PersistentVolumeClaim wpdev-wordpress created
64+ + ├─ kubernetes:core:Service wpdev-wordpress created
65+ + ├─ kubernetes:core:ConfigMap default/wpdev-mariadb created
66+ + ├─ kubernetes:core:Service default/wpdev-mariadb created
67+ + ├─ kubernetes:apps:StatefulSet default/wpdev-mariadb created
68+ + └─ kubernetes:apps:Deployment wpdev-wordpress created
69+
70+ Outputs:
71+ frontendIp: " 35.193.210.254"
72+
73+ Resources:
74+ + 10 created
75+
76+ Duration: 53s
8077```
8178
8279We can see here in the ` ---outputs:--- ` section that Wordpress was allocated a public IP, in this
@@ -87,3 +84,34 @@ and `grep` to retrieve the `<title>` of the site the proxy points at.
8784$ curl -sL $( pulumi stack output frontendIp) :80 | grep " <title>"
8885< title> User& # 039;s Blog! – Just another WordPress site</title>
8986```
87+
88+ You can also navigate to the site in a web browser.
89+
90+ When you're done, you can remove these resources with ` pulumi destroy ` :
91+
92+ ``` sh
93+ pulumi destroy --skip-preview
94+ Destroying (ts-helm-wordpress)
95+
96+ View Live: https://app.pulumi.com/example/wordpress/ts-helm-wordpress/updates/8
97+
98+ Type Name Status
99+ - pulumi:pulumi:Stack wordpress-ts-helm-wordpress deleted
100+ - └─ kubernetes:helm.sh:Chart wpdev deleted
101+ - ├─ kubernetes:core:Secret wpdev-wordpress deleted
102+ - ├─ kubernetes:core:Secret default/wpdev-mariadb deleted
103+ - ├─ kubernetes:core:ConfigMap default/wpdev-mariadb deleted
104+ - ├─ kubernetes:core:Service default/wpdev-mariadb deleted
105+ - ├─ kubernetes:core:PersistentVolumeClaim wpdev-wordpress deleted
106+ - ├─ kubernetes:core:Service wpdev-wordpress deleted
107+ - ├─ kubernetes:apps:StatefulSet default/wpdev-mariadb deleted
108+ - └─ kubernetes:apps:Deployment wpdev-wordpress deleted
109+
110+ Outputs:
111+ - frontendIp: " 35.193.210.254"
112+
113+ Resources:
114+ - 10 deleted
115+
116+ Duration: 7s
117+ ```
0 commit comments