Skip to content

Instantly share code, notes, and snippets.

@inaiat
Created June 10, 2020 12:35
Show Gist options
  • Save inaiat/fa0f4577c58421381a7c97c5e9f9f620 to your computer and use it in GitHub Desktop.
Save inaiat/fa0f4577c58421381a7c97c5e9f9f620 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: echoserver
namespace: foo
spec:
replicas: 1
selector:
matchLabels:
app: echoserver
template:
metadata:
labels:
app: echoserver
spec:
containers:
- image: k8s.gcr.io/echoserver:1.10
imagePullPolicy: IfNotPresent
name: echoserver
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
namespace: foo
name: echoserver-svc
labels:
app: echoserver
spec:
ports:
- name: http
port: 80
targetPort: 8080
selector:
app: echoserver
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
namespace: foo
name: echoserver
spec:
hosts:
- "apis-hml.volanty.com"
gateways:
- api-gateway.default
http:
- match:
- uri:
prefix: /foo
rewrite:
uri: /.
route:
- destination:
port:
number: 80
host: echoserver-svc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment