<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sander Alberink on Medium]]></title>
        <description><![CDATA[Stories by Sander Alberink on Medium]]></description>
        <link>https://medium.com/@alberink?source=rss-f400630d1e5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*R5o9Mi5-d1OU08Ct.</url>
            <title>Stories by Sander Alberink on Medium</title>
            <link>https://medium.com/@alberink?source=rss-f400630d1e5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:01:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alberink/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Gateway to Kubernetes…]]></title>
            <link>https://medium.com/qodea/gateway-to-kubernetes-4b8c24d007f3?source=rss-f400630d1e5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b8c24d007f3</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[gke]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[infrastructure]]></category>
            <dc:creator><![CDATA[Sander Alberink]]></dc:creator>
            <pubDate>Thu, 16 Nov 2023 14:36:36 GMT</pubDate>
            <atom:updated>2023-11-16T14:36:36.434Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="AI generated image of an cyberpunk gateway to kubernetes" src="https://cdn-images-1.medium.com/max/1024/0*37fxSoRcFYycrTVi.jpg" /></figure><p>As part of my excursions into IPv6 support on Google Cloud I was triggered by a colleague on some load balancer support options for Kubernetes clusters. One of the contestants was the new Gateway API (now GA, available on Kubernetes v1.24 and above). As I had my testbed already setup and wanted to see how this would work, I whipped up a quick PoC on my cluster.</p><h4>What does Gateway API attempt to accomplish</h4><p>The <a href="https://kubernetes.io/docs/concepts/services-networking/gateway/">Gateway API</a> can be viewed as a superset of the Ingress load-balancing functionality in Google Cloud. The existing Ingress API has a few downsides that lead to complexity in managing larger clusters or multi-clusters. The most important one IMHO is that it places control of a infrastructure resources in the hands of application developers without an ability to share these infrastructure resources across application teams. On Google cloud, for example this could lead to a large number of Global Cloud Load Balancers, one for every Ingress defined by an application team. This complicates hosting different applications on the same domain for example.</p><p>Gateway API tackles these and other use-cases by splitting the Ingress in two: the Gateway (potentially managed by a different infrastructure team) and the actual HTTP routes (managed by the application developers). In addition to the HTTP ingress supported by Google cloud, this adds support for gRPC, TCP and UDP ingresses. The last 2 options are not yet supported by Google&#39;s implementation of the Gateway API, but I assume that support for these options will come eventually in the TCP/UDP global load balancer.</p><h4>How to build a Gateway?</h4><p>What do we need to get started with this? Well, right off the bat we need a cluster capable of running the Gateway API. Luckily, on Google Cloud this is as simple as enabling the gateway on a supported cluster version (1.24+ for GKE Standard, 1.26+ for GKE Autopilot). <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-gateways#limitations">Some other restrictions</a> also apply.</p><pre>   gcloud container clusters update &lt;clustername&gt; \<br>    --gateway-api=standard \<br>    --location=&lt;cluster region or zone&gt;</pre><p>We can check if the Gateway API is enabled on a cluster by checking for the presence of the GatewayClass CRD by running kubectl get gatewayclass which should yield output similar to the following:</p><pre>NAME                             CONTROLLER                  ACCEPTED   AGE<br>gke-l7-global-external-managed   networking.gke.io/gateway   True       16h<br>gke-l7-regional-external-managed networking.gke.io/gateway   True       16h<br>gke-l7-gxlb                      networking.gke.io/gateway   True       16h<br>gke-l7-rilb                      networking.gke.io/gateway   True       16h</pre><p>This shows the load balancers the Google Cloud Gateway implementation makes available, with a selection of global and regional, external and internal load balancers.</p><p>Now that we have our cluster prepped, lets deploy the gateway part of the equation:</p><pre>kind: Namespace<br>apiVersion: v1<br>metadata:<br>  name: infra<br>---<br>kind: Gateway<br>apiVersion: gateway.networking.k8s.io/v1beta1<br>metadata:<br>  name: external-http<br>  namespace: infra<br>spec:<br>  gatewayClassName: gke-l7-global-external-managed<br>  listeners:<br>  - name: http<br>    protocol: HTTP<br>    port: 80<br>    allowedRoutes:<br>      kinds:<br>      - kind: HTTPRoute<br>      namespaces:<br>        from: Same<br>  - name: https<br>    protocol: HTTPS<br>    port: 443<br>    allowedRoutes:<br>      kinds:<br>      - kind: HTTPRoute<br>      namespaces:<br>        from: All<br>    tls:<br>      mode: Terminate<br>      options:<br>        networking.gke.io/pre-shared-certs: apenrots<br>  addresses:<br>  - type: NamedAddress<br>    value: ipv6-lb<br>------<br>kind: HTTPRoute<br>apiVersion: gateway.networking.k8s.io/v1beta1<br>metadata:<br>  name: redirect<br>  namespace: infra<br>spec:<br>  parentRefs:<br>  - namespace: infra<br>    name: external-http<br>    sectionName: http<br>  rules:<br>  - filters:<br>    - type: RequestRedirect<br>      requestRedirect:<br>        scheme: https<br></pre><p>This bit of YAML accomplishes the following:</p><ul><li>The gateway is deployed in the infra namespace</li><li>It implements a HTTP-to-HTTPS redirect for all traffic</li><li>It allows contribution of HTTPRoutes from all deployed kubernetes namespaces on the cluster</li><li>And it terminates TLS using a named certificate</li></ul><p>Next up, a pod and service contributing a route:</p><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: site-v1<br>  labels:<br>    app.kubernetes.io/name: site-v1<br>spec:<br>  containers:<br>  - name: whereami<br>    image: us-docker.pkg.dev/google-samples/containers/gke/whereami:v1.2.21<br>    ports:<br>    - containerPort: 8080<br>    env:<br>    - name: METADATA<br>      value: &quot;site-v1&quot;<br>---<br>kind: Service<br>apiVersion: v1<br>metadata:<br>  name: site-v1<br>spec:<br>  selector:<br>    app.kubernetes.io/name: site-v1<br>  ports:<br>    - port: 8080<br>      protocol: TCP<br>      targetPort: 8080<br>---<br>kind: HTTPRoute<br>apiVersion: gateway.networking.k8s.io/v1beta1<br>metadata:<br>  name: site-v1<br>spec:<br>  parentRefs:<br>  - kind: Gateway<br>    name: external-http<br>    namespace: infra<br>  hostnames:<br>  - &quot;google-ipv6.apenrots.info&quot;<br>  rules:<br>  - backendRefs:<br>    - name: site-v1<br>      port: 8080</pre><p>The pod and service spec are simple, the interesting part is the HTTPRoute document. It contributes a route to the named Gateway external-http in the infra namespace, for the hostname google-ipv6.apenrots.info and attaches it to the service site-v1 . Simple enough, isn’t it? Let’s amp it up a little:</p><pre>kind: Namespace<br>apiVersion: v1<br>metadata:<br>  name: cts<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: site-v2<br>  namespace: cts<br>spec:<br>  selector:<br>    app: site<br>    version: v2<br>  ports:<br>  - port: 8080<br>    targetPort: 8080<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: site-v2<br>  namespace: cts<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: site<br>      version: v2<br>  template:<br>    metadata:<br>      labels:<br>        app: site<br>        version: v2<br>    spec:<br>      containers:<br>      - name: whereami<br>        image: us-docker.pkg.dev/google-samples/containers/gke/whereami:v1.2.21<br>        ports:<br>        - containerPort: 8080<br>        env:<br>        - name: METADATA<br>          value: &quot;site-v2&quot;<br>---<br>kind: HTTPRoute<br>apiVersion: gateway.networking.k8s.io/v1beta1<br>metadata:<br>  name: site-v2<br>  namespace: cts<br>spec:<br>  parentRefs:<br>  - kind: Gateway<br>    name: external-http<br>    namespace: infra<br>  hostnames:<br>  - &quot;google-ipv6.apenrots.info&quot;<br>  rules:<br>  - matches:<br>    - path:<br>        value: /site2<br>    filters:<br>    - type: URLRewrite<br>      urlRewrite:<br>        path:<br>          type: ReplacePrefixMatch<br>          replacePrefixMatch: /<br>    backendRefs:<br>    - name: site-v2<br>      port: 8080</pre><p>Here we deploy a service and a deployment in their own cts namespace, and we are contribution a HTTPRoute to reach it. The route is attached to the named gateway again, but it will respond to requests to /site2 . In addition, the request URL will be rewritten to remove the /site2 path prefix before forwarding it to the site-v2 service. Nice!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/0*YqgQKx0GyylPLd2u.jpg" /></figure><h4>Gateway drugs…</h4><p>We can further spice things up some more by adding additional Google Cloud goodness such as Cloud Armor and tweaks to our backend config by associating a GcpBackendPolicy with the gateway. Let&#39;s start by creating a <a href="https://cloud.google.com/armor/docs/configure-security-policies">Cloud Armor</a> and a SSL policy:</p><pre>gcloud compute security-policies create cts-cloud-armor-policy<br>gcloud compute security-policies update cts-cloud-armor-policy  --enable-layer7-ddos-defense<br>gcloud compute ssl-policies create cts-ssl-policy --profile=MODERN</pre><p>Then lets create a backend policy as follows:</p><pre>apiVersion: networking.gke.io/v1<br>kind: GCPBackendPolicy<br>metadata:<br>  name: cts-backend-policy<br>  namespace: infra<br>spec:<br>  default:<br>    securityPolicy: cts-cloud-armor-policy<br>    timeoutSec: 40<br>  targetRef:<br>    group: &quot;&quot;<br>    namespace: cts<br>    kind: Service<br>    name: site-v2</pre><p>This will attach a backend configuration to the service site-v2 , with an adjusted timeout of 40 second and our newly created Cloud Armor policy attached to it.</p><p>Note: this is not yet visible in Google Cloud Console, you’ll have to check through kubectl. You can check this through kubectl describe gcpbackendpolicies.networking.gke.io --namespace infra .</p><p>Lastly, lets add the SSL config we just created to the gateway:</p><pre>apiVersion: networking.gke.io/v1<br>kind: GCPGatewayPolicy<br>metadata:<br>  name: infra-gateway-policy<br>  namespace: infra<br>spec:<br>  default:<br>    sslPolicy: cts-ssl-policy<br>  targetRef:<br>    group: gateway.networking.k8s.io<br>    kind: Gateway<br>    name: external-http</pre><h4>Migrating to Gateway API</h4><p>the Kubernetes SIG Network working group has made a conversion tool available that will allow <a href="https://github.com/kubernetes-sigs/ingress2gateway">easy in-place conversion</a> of an Ingress to the equivalent Gateway. However, it is currently not supported for Google Cloud load balancers but hopefully this will be remedied soon.</p><h4>Gateway to the future</h4><p>I hope these examples give some insight into what is possible using the Gateway API on Google Cloud. I haven’t touched upon any of the <a href="https://cloud.google.com/blog/products/containers-kubernetes/multi-cluster-gateway-controller-for-gke-is-now-ga">multi-cluster Gateway goodness that has also landed in GA </a>on Google cloud, nor on the possibilities for regional or internal load balancing. The Gateway API specification has even more interesting use cases in store, but non-HTTP related functionality remains to be implemented in Google Cloud. Google has not made an announcement when the remaining functionality will be implemented, but it’s my expectation that we will see some preview functionality soon enough. And now back to my IPv6 playground…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b8c24d007f3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qodea/gateway-to-kubernetes-4b8c24d007f3">Gateway to Kubernetes…</a> was originally published in <a href="https://medium.com/qodea">Beyond Engineering.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Apigee Environment]]></title>
            <link>https://medium.com/google-cloud/my-first-apigee-environment-607ad06a115d?source=rss-f400630d1e5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/607ad06a115d</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[apigee]]></category>
            <category><![CDATA[apigee-x]]></category>
            <category><![CDATA[gcp-app-dev]]></category>
            <dc:creator><![CDATA[Sander Alberink]]></dc:creator>
            <pubDate>Wed, 12 Jul 2023 12:55:13 GMT</pubDate>
            <atom:updated>2023-07-13T03:13:11.576Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a repost of an article that went up on <a href="https://medium.com/cts-technologies">CTS’s Medium channel</a> before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SlSZ_AjmBMeOSAEGlX0Sig.png" /></figure><p><a href="https://cloud.google.com/apigee">Apigee</a> is a brilliant solution to deliver API’s to customers, internal developers, and external partners. In the past Apigee as an offering was held back by having to commit to a yearly subscription just to get your toes in the water, putting it somewhat out of reach of smaller companies. However, Google has recently launched a Pay-as-you-Go tier for Apigee bringing the technology to a broader audience. To whet the appetite a bit for Apigee, I’ve set out to create a simple demo to showcase some of the things that Apigee can do. For the purposes of installing this demo, I assume you have a Google Cloud project ready to go, with billing set up on it. Also, I’m assuming that <a href="https://www.terraform.io/">Terraform</a> is installed and that a command-line does not scare you witless.</p><p>Following this demo will create an Apigee evaluation installation that gives you access to all features of Apigee for a period of 2 months. After these 2 months, the Apigee organization is automatically garbage collected. Beware that all Apigee configurations and proxies you create in that organization will be lost upon deletion, so make sure to export them before the end of the evaluation period. Also, although the Apigee evaluation is free of charge, some resources such as compute and load balancers will be consumed in your Google Cloud project.</p><p>With all these caveats out of the way, this is the demo set up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aGmV35cTufHzi9tM" /><figcaption>Apigee demo overview</figcaption></figure><p>This demo will connect directly to Apigee with a <a href="https://cloud.google.com/vpc/docs/private-service-connect">Private Service Connection</a> (PSC) through a PSC <a href="https://cloud.google.com/load-balancing/docs/negs#psc-neg">Network Endpoint Group</a> (NEG) as the backend for the Google Cloud Global L7 load balancer. This eliminates the need for a bridge VM to forward traffic to the Apigee runtime plane.</p><p>We’ll be setting all this up using Terraform as much as possible, but unfortunately creating the PSC NEG needs to be done on the command line as this is not currently supported in the Google terraform provider.</p><p>Let’s start by cloning the following <a href="https://github.com/salberin/cts-apigee.git">GitHub repository</a> and setting up a set of environment variables we’ll use to refer to in subsequent commands. The access token we store has a limited validity, should you receive an unauthorized error in any of the steps later on, you’ll need to re-generate the access token.</p><pre>git clone https://github.com/salberin/cts-apigee.git<br>export AUTH=&quot;Authorization: Bearer $(gcloud auth print-access-token)&quot;<br>export PROJECT_ID=&quot;&lt;YOUR_GOOGLE_PROJECT_ID&gt;&quot;<br>export RUNTIME_LOCATION=&quot;europe-west1&quot;<br>export ENV_NAME=&quot;demo&quot;<br>cd terraform</pre><p>Put the following terraform command in to generate the whole Apigee organization:</p><pre>terraform init<br>terraform apply -var &quot;project_id=$PROJECT_ID&quot; -var &quot;region=$RUNTIME_LOCATION&quot; \<br>-var &quot;env_name=$ENV_NAME&quot;</pre><p>After the terraform has completed (mind you, this may take a while — up to 45 minutes!) you will receive the hostname for the Apigee loadbalancer as an output. We finish the setup by creating a PSC NEG and attaching it to our loadbalancer back end. We first retrieve the service attachment from an Apigee API call (as it is unfortunately not available from the terraform output) and create the back end from that info using gcloud commands.</p><pre>export AUTH=&quot;Authorization: Bearer $(gcloud auth print-access-token)&quot;<br>SERVICE_ATT=$(curl -X GET -H &quot;$AUTH&quot;  \<br>  &quot;https://apigee.googleapis.com/v1/organizations/$PROJECT_ID/instances&quot; \<br>  | jq -r &#39;.instances[0].serviceAttachment&#39;)<br>gcloud compute network-endpoint-groups create $ENV_NAME-neg \<br>  --network-endpoint-type=private-service-connect \<br>  --psc-target-service=$SERVICE_ATT --region=$RUNTIME_LOCATION \<br>  --project=$PROJECT_ID<br>gcloud compute backend-services add-backend apigee-$ENV_NAME-backend \<br>  --network-endpoint-group=$ENV_NAME-neg \<br>  --network-endpoint-group-region=$RUNTIME_LOCATION \<br>  --global --project=$PROJECT_ID</pre><p>Et viola! We have a Apigee organization setup, with connectivity to boot!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*TK9FNbgWTU9HDu4m.jpg" /></figure><p>Next step: deploy an API gateway. Contained in the repo there is a sample hello-world proxy that will print out a simple hello world messages when called.</p><pre>cd ../proxy<br>export MGMT_HOST=&quot;https://apigee.googleapis.com&quot;<br>curl -s -X POST \<br>&quot;$MGMT_HOST/v1/organizations/$PROJECT_ID/apis?action=import&amp;name=hello-world&quot; \<br>  -H &quot;$AUTH&quot; --form file=@&quot;./hello-world.zip&quot;<br>curl -s -X POST -H &quot;$AUTH&quot; \<br>&quot;$MGMT_HOST/v1/organizations/$PROJECT_ID/environments/$ENV_NAME-environment/apis/hello-world/revisions/1/deployments&quot;<br>export HOST=&quot;&lt;&lt;hostname printed as part of terraform output&gt;&gt;&quot;<br>curl -i -H &quot;Host: $HOST&quot; https://$HOST/hello-world</pre><p>Take into account that certificate generation may take some time and therefore that the last curl command may fail until that has completed. And there you have it: an Apigee gateway, deployed through terraform, running behind a private service connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4InzQWVcjn9ITpLz5nVqLw.png" /></figure><p>Next up: making a proxy do something useful. Watch this space and until then, keep it Googley (as my esteemed colleague <a href="https://medium.com/u/58f877f4241a">Alistair Grew</a> would say.)</p><h3>About CTS</h3><p><a href="https://cts.co/">CTS</a> is the largest dedicated Google Cloud practice in Europe and one of the world’s leading Google Cloud experts, winning 2020 Google Partner of the Year Awards for both Workspace and GCP.</p><p>We offer a unique full stack Google Cloud solution for businesses, encompassing cloud migration and infrastructure modernisation. Our data practice focuses on analysis and visualisation, providing industry specific solutions for; Retail, Financial Services, Media and Entertainment.</p><p>We’re building talented teams ready to change the world using Google technologies. So if you’re passionate, curious and keen to get stuck in — take a look at our <a href="http://careers.cts.co/">Careers Page</a> and join us for the ride!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=607ad06a115d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/google-cloud/my-first-apigee-environment-607ad06a115d">My First Apigee Environment</a> was originally published in <a href="https://medium.com/google-cloud">Google Cloud - Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Apigee Environment]]></title>
            <link>https://medium.com/qodea/my-first-apigee-environment-9e6dba270d6e?source=rss-f400630d1e5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e6dba270d6e</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[apigee]]></category>
            <category><![CDATA[google-cloud]]></category>
            <dc:creator><![CDATA[Sander Alberink]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 13:58:36 GMT</pubDate>
            <atom:updated>2023-10-20T13:24:41.274Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SlSZ_AjmBMeOSAEGlX0Sig.png" /></figure><p><a href="https://cloud.google.com/apigee">Apigee</a> is a brilliant solution to deliver API’s to customers, internal developers, and external partners. In the past Apigee as an offering was held back by having to commit to a yearly subscription just to get your toes in the water, putting it somewhat out of reach of smaller companies. However, Google has recently launched a Pay-as-you-Go tier for Apigee bringing the technology to a broader audience. To whet the appetite a bit for Apigee, I’ve set out to create a simple demo to showcase some of the things that Apigee can do. For the purposes of installing this demo, I assume you have a Google Cloud project ready to go, with billing set up on it. Also, I’m assuming that <a href="https://www.terraform.io/">Terraform</a> is installed and that a command-line does not scare you witless.</p><p>Following this demo will create an Apigee evaluation installation that gives you access to all features of Apigee for a period of 2 months. After these 2 months, the Apigee organization is automatically garbage collected. Beware that all Apigee configurations and proxies you create in that organization will be lost upon deletion, so make sure to export them before the end of the evaluation period. Also, although the Apigee evaluation is free of charge, some resources such as compute and load balancers will be consumed in your Google Cloud project.</p><p>With all these caveats out of the way, this is the demo set up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aGmV35cTufHzi9tM" /><figcaption>Apigee demo overview</figcaption></figure><p>This demo will connect directly to Apigee with a <a href="https://cloud.google.com/vpc/docs/private-service-connect">Private Service Connection</a> (PSC) through a PSC <a href="https://cloud.google.com/load-balancing/docs/negs#psc-neg">Network Endpoint Group</a> (NEG) as the backend for the Google Cloud Global L7 load balancer. This eliminates the need for a bridge VM to forward traffic to the Apigee runtime plane.</p><p>We’ll be setting all this up using Terraform as much as possible, but unfortunately creating the PSC NEG needs to be done on the command line as this is not currently supported in the Google terraform provider.</p><p>Let’s start by cloning the following <a href="https://github.com/salberin/cts-apigee.git">GitHub repository</a> and setting up a set of environment variables we’ll use to refer to in subsequent commands. The access token we store has a limited validity, should you receive an unauthorized error in any of the steps later on, you’ll need to re-generate the access token.</p><pre>git clone https://github.com/salberin/cts-apigee.git<br>export AUTH=&quot;Authorization: Bearer $(gcloud auth print-access-token)&quot;<br>export PROJECT_ID=&quot;&lt;YOUR_GOOGLE_PROJECT_ID&gt;&quot;<br>export RUNTIME_LOCATION=&quot;europe-west1&quot;<br>export ENV_NAME=&quot;demo&quot;<br>cd terraform</pre><p>Put the following terraform command in to generate the whole Apigee organization:</p><pre>terraform init<br>terraform apply -var &quot;project_id=$PROJECT_ID&quot; -var &quot;region=$RUNTIME_LOCATION&quot; \<br>-var &quot;env_name=$ENV_NAME&quot;</pre><p>After the terraform has completed (mind you, this may take a while - up to 45 minutes!) you will receive the hostname for the Apigee loadbalancer as an output. The terraform command should now have created a PSC NEG and attached it to our loadbalancer back end.</p><p>Et viola! We have a Apigee organization setup, with Private Service Connect-based connectivity to boot!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*TK9FNbgWTU9HDu4m.jpg" /></figure><p>Next step: deploy an API gateway. Contained in the repo there is a sample hello-world proxy that will print out a simple hello world messages when called.</p><pre>cd ../proxy<br>export MGMT_HOST=&quot;https://apigee.googleapis.com&quot;<br>curl -s -X POST \<br>&quot;$MGMT_HOST/v1/organizations/$PROJECT_ID/apis?action=import&amp;name=hello-world&quot; \<br>  -H &quot;$AUTH&quot; --form file=@&quot;./hello-world.zip&quot;<br>curl -s -X POST -H &quot;$AUTH&quot; \<br>&quot;$MGMT_HOST/v1/organizations/$PROJECT_ID/environments/$ENV_NAME-environment/apis/hello-world/revisions/1/deployments&quot;<br>export HOST=&quot;&lt;&lt;hostname printed as part of terraform output&gt;&gt;&quot;<br>curl -i -H &quot;Host: $HOST&quot; https://$HOST/hello-world</pre><p>Take into account that certificate generation may take some time and therefore that the last curl command may fail until that has completed. And there you have it: an Apigee gateway, deployed through terraform, running behind a private service connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4InzQWVcjn9ITpLz5nVqLw.png" /></figure><p>Next up: making a proxy do something useful. Watch this space and until then, keep it Googley (as my esteemed colleague <a href="https://medium.com/u/58f877f4241a">Alistair Grew</a> would say.)</p><h3>About CTS</h3><p><a href="https://cts.co/">CTS</a> is the largest dedicated Google Cloud practice in Europe and one of the world’s leading Google Cloud experts, winning 2020 Google Partner of the Year Awards for both Workspace and GCP.</p><p>We offer a unique full stack Google Cloud solution for businesses, encompassing cloud migration and infrastructure modernisation. Our data practice focuses on analysis and visualisation, providing industry specific solutions for; Retail, Financial Services, Media and Entertainment.</p><p>We’re building talented teams ready to change the world using Google technologies. So if you’re passionate, curious and keen to get stuck in — take a look at our <a href="http://careers.cts.co/">Careers Page</a> and join us for the ride!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e6dba270d6e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qodea/my-first-apigee-environment-9e6dba270d6e">My First Apigee Environment</a> was originally published in <a href="https://medium.com/qodea">Beyond Engineering.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>