Hello World - Scala using Akka HTTP

    Follow the steps below to create the sample code and then deploy the app to your cluster. You can also download a working copy of the sample, by running the following commands:

    • A Kubernetes cluster installation with Knative Serving up and running.

    Configuring the Service descriptor

    Importantly, in service.yaml change the image reference to match up with your designated repository, i.e. replace {username} with your Dockerhub username in the example below.

    1. apiVersion: serving.knative.dev/v1
    2. kind: Service
    3. name: helloworld-scala
    4. namespace: default
    5. spec:
    6. template:
    7. - image: docker.io/{username}/helloworld-scala
    8. env:
    9. - name: TARGET
    10. value: "Scala Sample v1"

    Deploying to Knative Serving

    Apply the Service yaml definition:

    1. kubectl apply --filename service.yaml

    Then find the service host:

    Feedback

    Was this page helpful?

    Glad to hear it! Please tell us how we can improve.