Skip to content

Instantly share code, notes, and snippets.

@miticojo
Last active November 21, 2022 11:26
Show Gist options
  • Save miticojo/b065c6b210a1dc4e067718dbdf6a8f25 to your computer and use it in GitHub Desktop.
Save miticojo/b065c6b210a1dc4e067718dbdf6a8f25 to your computer and use it in GitHub Desktop.

Revisions

  1. miticojo revised this gist Nov 21, 2022. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions httpbin-istio.yaml
    Original file line number Diff line number Diff line change
    @@ -68,10 +68,6 @@ spec:
    - httpbin-gateway
    http:
    - match:
    - uri:
    prefix: /status
    - uri:
    prefix: /delay
    route:
    - destination:
    port:
  2. miticojo created this gist Nov 21, 2022.
    80 changes: 80 additions & 0 deletions httpbin-istio.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,80 @@
    apiVersion: v1
    kind: ServiceAccount
    metadata:
    name: httpbin
    ---
    apiVersion: v1
    kind: Service
    metadata:
    name: httpbin
    labels:
    app: httpbin
    service: httpbin
    spec:
    ports:
    - name: http
    port: 8000
    targetPort: 80
    selector:
    app: httpbin
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: httpbin
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: httpbin
    version: v1
    template:
    metadata:
    labels:
    app: httpbin
    version: v1
    spec:
    serviceAccountName: httpbin
    containers:
    - image: docker.io/kennethreitz/httpbin
    imagePullPolicy: IfNotPresent
    name: httpbin
    ports:
    - containerPort: 80
    ---
    apiVersion: networking.istio.io/v1alpha3
    kind: Gateway
    metadata:
    name: httpbin-gateway
    spec:
    selector:
    istio: ingressgateway # use Istio default gateway implementation
    servers:
    - port:
    number: 80
    name: http
    protocol: HTTP
    hosts:
    - "*"
    ---
    apiVersion: networking.istio.io/v1alpha3
    kind: VirtualService
    metadata:
    name: httpbin
    spec:
    hosts:
    - "*"
    gateways:
    - httpbin-gateway
    http:
    - match:
    - uri:
    prefix: /status
    - uri:
    prefix: /delay
    route:
    - destination:
    port:
    number: 8000
    host: httpbin