Skip to content

Instantly share code, notes, and snippets.

@eduardobaitello
Created October 24, 2018 18:11
Show Gist options
  • Save eduardobaitello/b7217bee200ca833a8016e1b5b1669ff to your computer and use it in GitHub Desktop.
Save eduardobaitello/b7217bee200ca833a8016e1b5b1669ff to your computer and use it in GitHub Desktop.
Create Istio resources to allow containers access external s3 buckets
# https://istio.io/docs/tasks/traffic-management/egress/#configuring-istio-external-services
# In this example the bucket is in the us-east-1 region
# Make sure to match the host with the endpoint of your region: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: egress-amazon-s3
spec:
hosts:
- my-bucket-name.s3.amazonaws.com
location: MESH_EXTERNAL
ports:
- number: 443
name: https
protocol: HTTPS
resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: egress-amazon-s3
spec:
hosts:
- my-bucket-name.s3.amazonaws.com
tls:
- match:
- port: 443
sni_hosts:
- my-bucket-name.s3.amazonaws.com
route:
- destination:
host: my-bucket-name.s3.amazonaws.com
port:
number: 443
weight: 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment