1

I deployed these two services to my cluster under namespace prisma:

kubectl get services -n prisma

NAME       TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)          AGE
database   ClusterIP   10.23.252.18   <none>        3306/TCP         3d
prisma     NodePort    10.23.248.0    <none>        4466:31001/TCP   1d

But when I do cluster-info, it only shows the master and none of my services are showing up:

kubectl cluster-info -n prisma
Kubernetes master is running at https://my-cluster-ip

Is this correct?

I expect to see something like:

Kubernetes master is running at https://my-cluster-ip
Prisma is running at https://my-cluster-ip/api/v1/namespaces/prisma/services/prisma/proxy
...

1 Answer 1

3

Yes, that's correct. kubectl cluster-info --help says:

Display addresses of the master and services with label kubernetes.io/cluster-service=true 

That label, under the kubernetes.io "namespace" (referring to the hierarchical syntax used in labels, not to namespace objects in clusters), has special meaning- it is used for services and other resources that are important parts of the cluster machinery, usually packaged and managed as addons. It is not to be used for ordinary tenant services.

If your services fall into the category of cluster infrastructure, you can add that label to them and their related resources. A good example of the use of this label is in the monitoring tool heapster-

https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml

Sign up to request clarification or add additional context in comments.

1 Comment

OK. sounds reasonable. Can you elaborate on how to add the label to the service?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.