1. Packages
  2. Kubernetes
  3. How-to Guides
  4. Wordpress Helm Chart Deployed Using Helm Release Resource
Kubernetes v4.13.1 published on Tuesday, Jun 4, 2024 by Pulumi

Wordpress Helm Chart Deployed Using Helm Release Resource

kubernetes logo
Kubernetes v4.13.1 published on Tuesday, Jun 4, 2024 by Pulumi

    View Code Deploy this example with Pulumi

    Uses the Helm Release API of @pulumi/kubernetes to deploy v13.0.6 of the Wordpress Helm Chart to a Kubernetes cluster. The Helm Release resource will install the Chart mimicing behavior of the Helm CLI.

    wordpress

    Running the App

    If you haven’t already, follow the steps in Pulumi Installation and Setup and Configuring Pulumi Kubernetes to get set up with Pulumi and Kubernetes.

    Create a new stack:

    $ pulumi stack init
    Enter a stack name: dev
    

    Preview the deployment of the application and the perform the deployment:

    pulumi up
    Previewing update (dev)
    
    View Live: https://app.pulumi.com/.../kubernetes-cs-helm-release-wordpress/dev/previews/aa6d614e-d4b9-4abf-9a21-4c2c353fca3f
    
         Type                              Name                                      Plan
     +   pulumi:pulumi:Stack               kubernetes-cs-helm-release-wordpress-dev  create
     +   ├─ kubernetes:helm.sh/v3:Release  wpdev                                     create
     +   └─ kubernetes:core/v1:Service     wpdev-wordpress                           create
    
    Resources:
        + 3 to create
    
    Do you want to perform this update? yes
    Updating (dev)
    
    View Live: https://app.pulumi.com/.../kubernetes-cs-helm-release-wordpress/dev/updates/4
    
         Type                              Name                                      Status
     +   pulumi:pulumi:Stack               kubernetes-cs-helm-release-wordpress-dev  created
     +   ├─ kubernetes:helm.sh/v3:Release  wpdev                                     created
         └─ kubernetes:core/v1:Service     wpdev-wordpress
    
    Outputs:
        FrontendIP        : "10.96.224.4"
        PortForwardCommand: "kubectl port-forward svc/wpdev-277o20tl-wordpress 8080:80"
    
    Resources:
        + 2 created
    
    Duration: 1m18s
    

    We can see here in the ---outputs:--- section that Wordpress was allocated a Cluster IP, in this case 10.96.224.4. It is exported with a stack output variable, frontendIp. Since this is a Cluster IP, you will need to port-forward to the service in order to hit the endpoint at http://localhost:8080 by running the port-forward command specified in portForwardCommand.

    You can navigate to the site in a web browser.

    When you’re done, you can remove these resources with pulumi destroy:

    pulumi destroy --skip-preview
    Destroying (dev)
    
    View Live: https://app.pulumi.com/.../kubernetes-cs-helm-release-wordpress/dev/updates/5
    
         Type                              Name                                      Status
     -   pulumi:pulumi:Stack               kubernetes-cs-helm-release-wordpress-dev  deleted
     -   └─ kubernetes:helm.sh/v3:Release  wpdev                                     deleted
    
    Outputs:
      - FrontendIP        : "10.96.224.4"
      - PortForwardCommand: "kubectl port-forward svc/wpdev-277o20tl-wordpress 8080:80"
    
    Resources:
        - 2 deleted
    
    Duration: 16s
    
    The resources in the stack have been deleted, but the history and configuration associated with the stack are still maintained.
    If you want to remove the stack completely, run 'pulumi stack rm dev'.
    
    kubernetes logo
    Kubernetes v4.13.1 published on Tuesday, Jun 4, 2024 by Pulumi