S
S
Saboteur2019-04-10 14:12:24
Domain Name System
Saboteur, 2019-04-10 14:12:24

Is it possible to use Openshift route/service to manage DNS aliases?

For bureaucratic reasons, regular DNS balancers cannot be automatically managed, but I would like to be able to quickly switch myapp.url from one host to another.
With components that have already migrated to openshift, everything is fine. But there are still many components on separate hosts, and I thought, can I use services and routes in openshift to address not pods, but external hosts?
Tried to make a service like

kind: Service
apiVersion: v1
metadata:
  name: myapp
spec:
  ports:
  - name: http
    port: 80
    targetPort: 8080
  externalName: anotherhost.internaldomain.com

Did not work. By IP (instead of externalName I use externalIPs: - xxxx) - also did not work.
I want to understand, is this basically not implemented, or am I not able to make configs?
PS With the openshift, the hat is familiar, the kubernetes under the hood is not the newest, in any case, the protocol is available only for TCP / UDP - there is no HTTP, although it is mentioned in the documentation for kubernetes 1.1.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vovanys, 2019-04-12
@Vovanys

You make such a service
kind: "Service"
apiVersion: "v1"
metadata:
name: "myapp"
spec:
type: ExternalName
externalName: anotherhost.internaldomain.com
And pull from the inside.
You can use ip instead of FQDN and it works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question