Skip to content

Instantly share code, notes, and snippets.

@bprashanth
Created August 24, 2015 18:57
Show Gist options
  • Save bprashanth/3cb2861d86058fa9cc17 to your computer and use it in GitHub Desktop.
Save bprashanth/3cb2861d86058fa9cc17 to your computer and use it in GitHub Desktop.
a. pathmap
apiVersion: v1
kind: PathMap
metadata:
name: echomap
spec:
host: echo
pathMap:
"echo.foo.com":
"/x/*":
service:
kind: Service
name: echoheadersx
port:
name: http
port: 80
targetPort: 8080
nodePort: 30301
"/y/*":
service:
kind: Service
name: echoheadersy
port:
name: http
port: 80
targetPort: 8080
nodePort: 30284
"echo.bar.com":
"/x/*":
service:
kind: Service
name: echoheadersx
port:
name: http
port: 80
targetPort: 8080
nodePort: 30301
b. pathlist
apiVersion: v1
kind: PathMap
metadata:
name: echomap
spec:
host: echo
pathMap:
"foo.echo.com":
- path: "/x/*":
service:
name: echoheadersx
namespace: default
port: 80
path: "/y/*":
service:
name: echoheadersy
namespace: default
port: 80
"bar.echo.com":
- path: "/x/*":
service:
name: echoheadersx
namespace: default
port: 80
c. pathmap2
apiVersion: v1
kind: PathMap
metadata:
name: echomap
spec:
host: echo
pathMap:
"echo.foo.com":
"/x/*": default/echoheadersx:80
"/y/*": default/echoheadersy:80
"echo.bar.com":
"/x/*": default/echoheadersx:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment