Skip to content

Security-Guard monitoring quickstart

This tutorial shows how you can use Security-Guard to protect a deployed Knative Service.

Before you begin

Before starting the tutorial, make sure to install Security-Guard

Creating and deploying a service


The following commands create a helloworld-go sample Service while activating and configuring the Security-Guard extension for this Service. You can modify these commands, including changing the Security-Guard configuration for your service using either the kn CLI or changing the service yaml based on this example.

Create a sample securedService:

  1. Create a YAML file using the following example:

    kind: Service
      name: helloworld-go
      namespace: default
            - image:
                - name: TARGET
                  value: "Secured World"
  2. Apply the YAML file by running the command:

    kubectl apply -f <filename>.yaml

    Where <filename> is the name of the file you created in the previous step.

kn service create helloworld-go \
    --image \
    --env "TARGET=Secured World" \
    --annotation \

After the Service has been created, Guard starts monitoring the Service Pods and all Events sent to the Service.

Continue to Security-Guard alert example to test your installation

See the Using Security-Guard section to learn about managing the security of the service


To remove the deployed service use:

Delete using the YAML file used to create the service by running the command:

kubectl delete -f <filename>.yaml

Where <filename> is the name of the file you created in the previous step.

kn service delete helloworld-go

To remove the Guardian of the deployed service use:

kubectl delete helloworld-go
Back to top

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.

× OK