Deploy prebuilt samples

Before you begin

Deploy one of the samples

Kalix has several ready made sample applications for you to try out! In the table below you can see the available samples and the container image URL you’ll need if you want to deploy that sample. Clicking on the language will take you to the GitHub repository with the source code.

Sample Container image URL

A shopping cart based on a Value Entity (Key/Value store)

Java: gcr.io/kalix-public/samples-java-spring-valueentity-shopping-cart:0.0.1

Java/Protobuf: gcr.io/kalix-public/samples-java-value-entity-shopping-cart:0.0.3

A shopping cart based on an Event Sourced Entity

Java: gcr.io/kalix-public/samples-java-spring-eventsourced-shopping-cart:0.0.1

Java/Protobuf: gcr.io/kalix-public/samples-java-eventsourced-shopping-cart:0.0.3

CLI
  1. Log into your account:

    kalix auth login
  2. Choose the sample you want to deploy from the above table and run:

    kalix services deploy <name> <Container image URL from above table>
  3. To get an HTTP endpoint and enable CORS run:

    kalix services expose <name> --enable-cors

Invoke your service

Once the service has started successfully, start a proxy locally to invoke the service:

kalix service proxy <service name> --grpcui

The --grpcui option also starts and opens a gRPC web UI for exploring and invoking the service (available at http://127.0.0.1:8080/ui/).

Alternatively, command line clients such as grpcurl or curl can be used to invoke the service through the proxy at localhost:8080, using plaintext connections.

Next steps