1. Docs
  2. Clouds
  3. Kubernetes
  4. Get started
  5. Deploy changes

Pulumi & Kubernetes: Deploy changes

    Deploy the stack changes.

    $ pulumi up

    Pulumi computes the minimally disruptive change to achieve the desired state described by the program.

    Previewing update (dev):
         Type                           Name            Plan
         pulumi:pulumi:Stack            quickstart-dev
     +   └─ kubernetes:core/v1:Service  nginx           create
      + ip  : ""
      - name: "nginx-bec13562"
        + 1 to create
        2 unchanged
    Do you want to perform this update?  [Use arrows to move, type to filter]
    > yes

    Select yes using the arrows and hit enter to update the resources in Kubernetes.

    Pulumi will create the service since it is now defined in the program.

    Do you want to perform this update? yes
    Updating (dev):
         Type                           Name            Status
         pulumi:pulumi:Stack            quickstart-dev
     +   └─ kubernetes:core/v1:Service  nginx           created (10s)
      + ip  : ""
      - name: "nginx-bec13562"
        + 1 created
        2 unchanged
    Duration: 12s

    View the ip stack output from the nginx service.

    $ pulumi stack output ip

    If using Minikube: Minikube does not support type LoadBalancer. Instead, forward the nginx service:

    $ kubectl get service
    NAME             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
    kubernetes       ClusterIP        <none>        443/TCP   44h
    nginx-9e5d5cd4   ClusterIP   <none>        80/TCP    6m47s

    Note: The assigned name for this particular nginx service is nginx-9e5d5cd4; yours will be different. In a new terminal window, run:

     $ kubectl port-forward service/nginx-9e5d5cd4 8080:80
     Forwarding from -> 80
     Forwarding from [::1]:8080 -> 80

    Curl nginx to verify it is running.

    $ $(pulumi config get isMinikube) && curl "http://localhost:8080" || curl $(pulumi stack output ip)
    <!DOCTYPE html>
    <title>Welcome to nginx!</title>
    html { color-scheme: light dark; }
    body { width: 35em; margin: 0 auto;
    font-family: Tahoma, Verdana, Arial, sans-serif; }
    <h1>Welcome to nginx!</h1>
    <p>If you see this page, the nginx web server is successfully installed and
    working. Further configuration is required.</p>
    <p>For online documentation and support please refer to
    <a href="http://nginx.org/">nginx.org</a>.<br/>
    Commercial support is available at
    <a href="http://nginx.com/">nginx.com</a>.</p>
    <p><em>Thank you for using nginx.</em></p>

    Next, we’ll destroy the stack.

      Pulumi AI - What cloud infrastructure would you like to build? Generate Program