Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices on Cloud Run + VPC Network

Microservices on Cloud Run + VPC Network

Yuki Ito

July 18, 2022
Tweet

More Decks by Yuki Ito

Other Decks in Technology

Transcript

  1. What is Cloud Run Cloud Run is a managed compute

    platform that enables you to run containers that are invocable via requests or events. Cloud Run is serverless: it abstracts away all infrastructure management... https://cloud.google.com/run/docs
  2. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  3. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  4. Access Control Ingress settings and IAM authentication methods are two

    ways of managing access to a service. They are independent of each other. For a layered approach to managing access, use both. https://cloud.google.com/run/docs/securing/ingress
  5. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  6. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  7. Serverless VPC Access Conector For requests from other Cloud Run

    services ... in the same project, connect the service ... to a VPC network and route all egress through the connector... https://cloud.google.com/run/docs/securing/ingress#internal-services
  8. Serverless VPC Access Conector Serverless VPC Access makes it possible

    for you to connect directly to your Virtual Private Cloud network from serverless environments such as Cloud Run... https://cloud.google.com/vpc/docs/serverless-vpc-access What is "Serverless VPC Access"...?
  9. Serverless VPC Access Conector --- apiVersion: serving.knative.dev/v1 kind: Service metadata:

    name: service-a spec: template: metadata: annotations: run.googleapis.com/vpc-access-egress: all-traffic run.googleapis.com/vpc-access-connector: projects/<Project Name>/locations/asia-northeast1/connectors/<Connector Name> # ...
  10. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  11. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  12. Shared VPC Network Shared VPC allows an organization to connect

    resources from multiple projects to a common Virtual Private Cloud (VPC) network, so that they can communicate with each other securely and e ffi ciently using internal IPs from that network https://cloud.google.com/vpc/docs/shared-vpc What is "Shared VPC"...?
  13. Shared VPC Network By default, requests through the Shared VPC

    Host Project are not treated as "internal"
  14. Shared VPC Network Resources in Shared VPC networks can only

    call internal services if the Shared VPC resources and the internal service are in the same VPC SC perimeter https://cloud.google.com/run/docs/securing/ingress#internal-services
  15. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  16. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter
  17. VPC Service Controls Perimeter VPC Service Controls improves your ability

    to mitigate the risk of data ex fi ltration from Google Cloud services... You can use VPC Service Controls to create perimeters that protect the resources and data... https://cloud.google.com/vpc-service-controls/docs/overview What is "VPC Service Controls Perimeter"...?
  18. Cloud Run Service-to-Service Networking • Access Control • Serverless VPC

    Access Connector • Shared VPC Network • VPC Service Controls Perimeter