A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/kubernetes-engine/docs/tutorials/configure-networking below:

Configure networking for a basic production cluster | GKE networking

Configure networking for a basic production cluster

Stay organized with collections Save and categorize content based on your preferences.

Autopilot Standard

This tutorial is intended for cloud architects and operations administrators interested in deploying a web application to a Google Kubernetes Engine (GKE) cluster and exposing it with an HTTPS load balancer.

Objectives

In this tutorial, you will learn how to:

Costs

In this document, you use the following billable components of Google Cloud:

To generate a cost estimate based on your projected usage, use the pricing calculator.

New Google Cloud users might be eligible for a

free trial

.

When you finish the tasks that are described in this document, you can avoid continued billing by deleting the resources that you created. For more information, see Clean up.

Before you begin Set up your project
Set up your environment

In this tutorial, you use Cloud Shell to manage resources hosted on Google Cloud. Cloud Shell is preinstalled with the software you need for this tutorial, including Terraform, kubectl and the gcloud CLI.

  1. Set environment variables:

    PROJECT_ID=$(gcloud config get-value project)
    gcloud config set project $PROJECT_ID
    gcloud config set compute/region us-central1
    
  2. Clone the code repository:

    git clone https://github.com/GoogleCloudPlatform/kubernetes-engine-samples.git
    
  3. Change to the working directory:

    cd kubernetes-engine-samples/autopilot/networking-tutorial
    
Create a GKE cluster

The following Terraform file creates a GKE cluster:

The following Terraform file creates a global IP address and Cloud DNS zone:

  1. Initialize Terraform:

    terraform init
    
  2. View the infrastructure changes:

    terraform plan
    

    When prompted, enter your domain, such as my-domain.net.

  3. Apply the Terraform configuration:

    terraform apply --auto-approve
    

    When prompted, enter your domain, such as my-domain.net.

    The output is similar to the following:

    Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
    
    Outputs:
    
    cluster_name = "networking-cluster"
    region = "us-central1"
    
Create an external Application Load Balancer
  1. The following manifest describes a ManagedCertificate, FrontendConfig, Deployment, Service, and Ingress:

    Replace DOMAIN_NAME with your domain name, such as my-domain.net.

    This manifest has the following properties:

  2. Apply the manifest to your cluster:

    kubectl apply -f kubernetes-manifests.yaml
    
  3. Verify the Ingress was created:

    kubectl describe ingress frontend
    

    The output is similar to the following:

    ...
      Events:
        Type    Reason  Age   From                     Message
        ----    ------  ----  ----                     -------
        Normal  ADD     2m    loadbalancer-controller  default/frontend
        Normal  CREATE  1m    loadbalancer-controller  ip: 203.0.113.2
    ...
    

    It might take several minutes for the Ingress to provision.

Test application
  1. Check the status of the SSL certificate:

    kubectl get managedcertificates.networking.gke.io networking-managed-cert
    

    The SSL certificate might take up to 30 minutes to provision. The following output indicates the SSL certificate is ready:

    NAME                      AGE   STATUS
    networking-managed-cert   28m   Active
    
  2. Run a curl command:

    curl -Lv https://DOMAIN_NAME
    

    The output is similar to the following:

    *   Trying 34.160.115.33:443...
    * Connected to DOMAIN_NAME (34.160.115.33) port 443 (#0)
    ...
    * TLSv1.3 (IN), TLS handshake, Certificate (11):
    ...
    * Server certificate:
    *  subject: CN=DOMAIN_NAME
    ...
    > Host: DOMAIN_NAME
    
Clean up

To avoid incurring charges to your Google Cloud account for the resources used in this tutorial, either delete the project that contains the resources, or keep the project and delete the individual resources.

Delete the project
    Caution: Deleting a project has the following effects:

    If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects can help you avoid exceeding project quota limits.

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.
Delete individual resources
  1. Delete the kubernetes resources:

    kubectl delete -f kubernetes-manifests.yaml
    
  2. Delete the Terraform resources:

    terraform destroy --auto-approve
    

    When prompted, enter your domain, such as my-domain.net.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-12 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4