Skip to content

Latest commit

 

History

History
 
 

deploy_service

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Deploy Service Cluster

This example illustrates how to deploy a service to the created cluster using the kubernetes provider.

It will:

  • Create a cluster
  • Configure authentication for the Kubernetes provider
  • Create an Nginx Pod
  • Create an Nginx Service

Inputs

Name Description Type Default Required
cluster_name_suffix A suffix to append to the default cluster name string "" no
compute_engine_service_account Service account to associate to the nodes in the cluster any n/a yes
ip_range_pods The secondary ip range to use for pods any n/a yes
ip_range_services The secondary ip range to use for services any n/a yes
network The VPC network to host the cluster in any n/a yes
project_id The project ID to host the cluster in any n/a yes
region The region to host the cluster in any n/a yes
subnetwork The subnetwork to host the cluster in any n/a yes

Outputs

Name Description
ca_certificate n/a
client_token n/a
cluster_name Cluster name
ip_range_pods The secondary IP range used for pods
ip_range_services The secondary IP range used for services
kubernetes_endpoint n/a
location n/a
master_kubernetes_version The master Kubernetes version
network n/a
project_id n/a
region n/a
service_account The default service account used for running nodes.
subnetwork n/a
zones List of zones in which the cluster resides

To provision this example, run the following from within this directory:

  • terraform init to get the plugins
  • terraform plan to see the infrastructure plan
  • terraform apply to apply the infrastructure build
  • terraform destroy to destroy the built infrastructure