Giter Club home page Giter Club logo

aks-terraform-starter's Introduction

aks-terraform-starter

This terraform code deploys a minimal AKS cluster.

Requirements

You will need the following installed:

Get Started

1. Authenticate with your Azure Account

Run az login to authenticate with your Azure Account.

2. Deploy the infrastructure with Terraform

Update the defaults in ./variables.tf.

terraform apply

[!IMPORTANT]
You can run terraform plan first to see what all resources will be deployed.

3. Connect Kubectl to the deployed cluster

After terraform apply is done running, you will get the following output:

Apply complete! Resources: 8 added, 0 changed, 0 destroyed.

Outputs:

client_certificate = <sensitive>
client_key = <sensitive>
cluster_ca_certificate = <sensitive>
cluster_password = <sensitive>
cluster_username = <sensitive>
host = <sensitive>
key_data = <sensitive>
kube_config = <sensitive>
kubernetes_cluster_name = "cluster-upright-tapir"
resource_group_name = "rg-upright-tapir"

Make a note of the kubernetes_cluster_name

az aks get-credentials --resource-group learning-aks-rg --name <kubernetes_cluster_name>

The above command will save the file in default .kube\config directory, to get kubeconfig file in the specific location use the following:

az aks get-credentials --resource-group learning-aks-rg --name <kubernetes_cluster_name> --file <specific_location>

4. Create an app with a deployment and service

kubectl apply -f app.yaml

Your App

You can check what pods are running in your cluster:

kubectl get pods

To get the external IP for your load-balancer, you can:

kubectl get service aks-sample-linux-service

Author

aks-terraform-starter's People

Contributors

rishabkumar7 avatar

Stargazers

 avatar Oluwasola Alufa avatar

Watchers

 avatar  avatar

Forkers

alosie muraliv21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.