Skip to content

Instantly share code, notes, and snippets.

@jmprusi
Created October 6, 2017 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmprusi/929ab4ffdf6dcda14dde704184421e80 to your computer and use it in GitHub Desktop.
Save jmprusi/929ab4ffdf6dcda14dde704184421e80 to your computer and use it in GitHub Desktop.
Wildcard routes issue
oc new-project test
oc new-app https://github.com/openshift/ruby-hello-world.git --name="hello01"
oc new-app https://github.com/openshift/ruby-hello-world.git --name="hello02"
oc new-app https://github.com/openshift/ruby-hello-world.git --name="hello03"
oc expose svc hello01 --hostname=hello01.127.0.0.1.nip.io
oc expose svc hello02 --hostname=2hello.127.0.0.1.nip.io
cat >/tmp/router.yml <<EOF
apiVersion: v1
kind: Route
metadata:
creationTimestamp: 2017-10-05T15:33:40Z
labels:
app: hello03
name: hello03
spec:
host: 999999.127.0.0.1.nip.io
port:
targetPort: 8080-tcp
to:
kind: Service
name: hello03
weight: 100
wildcardPolicy: Subdomain
status: {}
EOF
oc create -f /tmp/router.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment