Skip to content

Creating a Service

To get you up and running quickly we are going to run a sample Hello service.

Starting a Service via the Console

Click on the Create Service button on the bottom on the home page of the console.

triggermesh console

Click on Create Service and select from image

tm service dash

We are going to do two things:

  1. Set a name for our service: hello
  2. Specify a container image: gcr.io/cloudrun/hello

service wizard

After a few seconds a URL will appear similar to:

service view with routes

Clicking on it will get you to the Hello web application shown below:

cloudrun hello webpage

Congratulations you will have started your first service, if you do not use it, it will automatically scale to zero and wake up when you need to.

Creating a Service with its Manifest

If you know the Knative API already you can choose to paste the Service YAML manifest in the wizard directly.

For example, given this manifest:

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
    name: hello
    namespace: sebgoa
spec:
    template:
        spec:
            containers:
            - name: hello
              image: gcr.io/cloudrun/hello

You would create the service From YAML as in the snapshot below:

service from yaml

Note that a namespace with your username needs to be specified. Hence replace sebgoa in the snapshot above with your own username.

Back to top