Service Catalog Quick Start


The Power of Kubernetes Annotations

Have you ever been asked to troubleshoot a failing Kubernetes service and struggled to find basic information about the service such as the source repository and owner? Troubleshooting always begins with information gathering.

Kubernetes annotations are designed to solve exactly this problem. They are designed to add metadata to Kubernetes objects.

Using kubectl, let's create a basic service named ghost-service with the annotation set to "An annotated ghost service that points to nowhere in particular".

Copy and paste this into your terminal:

cat <<EOF | kubectl create -f -
apiVersion: v1
kind: Service
name: ghost-service
annotations: "An annotated ghost service that points to nowhere in particular"
- protocol: TCP
port: 80

You can easily view all of the annotations on your new service using kubectl:

$ kubectl describe svc ghost-service
Name: ghost-service
Namespace: default
Labels: <none>
Annotations: An annotated ghost service that points to nowhere in particular

You can also add annotations using the kubectl annotate command:

$ kubectl annotate svc ghost-service
service/ghost-service annotated
$ kubectl describe svc ghost-service
Name: ghost-service
Namespace: default
Labels: <none>
Annotations: Casper An annotated ghost service that points to nowhere in particular

As your number of services grows it can be challenging to view all of the annotation information via kubectl describe.

Ambassador Cloud Service Catalog provides a centralized view with an easily navigable web-based UI of your services running in all of your clusters. Let’s configure this now!


Service Catalog requires Edge Stack version 1.12 or greater to be installed in your cluster.

Install Edge Stack from here if needed.

If you already have Edge Stack installed, check your version by running this command:

kubectl get deploy -n ambassador ambassador -o jsonpath='{.spec.template.spec.containers[0].image}'

Is the image at version 1.12 or greater? Then you are ready to start using Service Catalog!

If not, follow this doc to upgrade Edge Stack.

1. Connect your Cluster to Ambassador Cloud

The Service Catalog is a web-based interface that lists all of your cluster's Services. You can view, add, and update metadata associated with each Service, such as the owner, version control repository, and associated Slack channel.

  1. Sign in to Ambassador Cloud with your GitHub account.

  2. At the top, hover over All Clusters then click Add a Cluster.

  3. Follow the prompts to name the cluster and click Generate a Cloud Token.

  4. Follow the prompts to install the cloud token into your cluster.

  5. When the token installation completes, refresh the Service Catalog page.

If you installed Edge Stack into an empty cluster you won't see any services in your catalog (except for the Edge Stack services which start with ambassador). Apply this sample app to quickly see an example of a service in the catalog:

kubectl apply -f

Then refresh your Service Catalog page and you should see the quote service listed.

2. Claim Ownership of a Service

Click the quote service in the list. The service details page now opens that displays additional information about the service.

The metadata for each service is determined by annotations included within your Kubernetes YAML config files. You can annotate the config of the ambassador service that you have just installed to display your name.

  1. Change the name of the owner of the quote service by replacing <your name> in the command below and running it:

    kubectl annotate --overwrite svc quote -n ambassador"<your name>"
  2. Refresh your Service Catalog page anl dook at the quote service to see the change with your name.

Modifying the annotations via kubectl is quick and easy, but the changes made to the annotations will not remain if a new deployment of the service is made.

Let's set another annotation using YAML instead to ensure that a new deployment includes the annotations.

3. Add Additional Metadata via YAML

Open the YAML config file of one of your services. If you applied our quote service earlier, you can download the YAML here.

  1. Navigate to the metadata property and locate the annotations property directly beneath it.

    apiVersion: v1
    kind: Service
    name: <service name>

    If you cannot find an annotations property, add one to your config in the location shown.

  2. Now add the following annotation, replacing <repo URL> with the related Git repository for the service: "<repo URL>"

    Your updated Service config should look something like this:

    apiVersion: v1
    kind: Service
    Name: <service name>
    annotations: ""
  3. Now apply this updated YAML to your cluster, replacing the file name:

    kubectl apply -f my_service.yaml

What's Next?

You've updated the owner and repo URL, but Service Catalog supports many more annotations! See the full list here.


We’re here to help if you have questions.