A
A
a000_000a2018-08-23 10:59:03
Nginx
a000_000a, 2018-08-23 10:59:03

How to specify an endpoint inside a Kubernetes service?

You need to register an endpoint in the Ingress Kube, such as /path1 in the /some-svc/path1 service. "serviceName": "some-svc/path1",does not want to swallow he does not like "/" and other similar characters.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ildar Iskhakov, 2018-09-06
@a000_000a

If I understood your question correctly, then everything is very simple
Create a service some-svc

kind: Service
apiVersion: v1
metadata:
  name: some-svc
spec:
  selector:
    app: MyApp
  ports:
  - protocol: TCP
    port: 80
    targetPort: 9376

And then ingress rule like this
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /some-svc/path1
        backend:
          serviceName: some-svc
          servicePort: 80

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question