Code Monkey home page Code Monkey logo

aks-container's Introduction

aks-container

The goal of this project is to quickly deploy, run, and connect to an Azure Kubernetes Service (AKS) cluster. The prerequisites for getting this working are:

  • Docker
  • A service principal with contributor access to a subscription.

Note: This project is intended for development purposes only and should not be used in production.

Quickstart

Using BASH:

Set the value for the required environment variables:

#!/bin/bash

export AZURE_CLIENT_ID=""
export AZURE_CLIENT_SECRET=""
export AZURE_TENANT_ID=""
export AZURE_SUBSCRIPTION_ID=""
export LOCATION=""
export CLUSTER_RESOURCE_GROUP=""
export CLUSTER_NAME=""
docker run -it --rm \
    -e AZURE_CLIENT_ID \
    -e AZURE_CLIENT_SECRET \
    -e AZURE_TENANT_ID \
    -e AZURE_SUBSCRIPTION_ID \
    -e LOCATION \
    -e CLUSTER_RESOURCE_GROUP \
    -e CLUSTER_NAME \
    --network host \
    -p 9001:9001 \
    -p 8080:8080 \
    oysteinje/aks-container:0.0.1-dev \
    create

Using PowerShell:

$env:AZURE_CLIENT_ID = ""
$env:AZURE_CLIENT_SECRET = ""
$env:AZURE_TENANT_ID = ""
$env:AZURE_SUBSCRIPTION_ID = ""
$env:LOCATION = ""
$env:CLUSTER_RESOURCE_GROUP = ""
$env:CLUSTER_NAME = ""
docker run -it --rm `
    -e AZURE_CLIENT_ID `
    -e AZURE_CLIENT_SECRET `
    -e AZURE_TENANT_ID `
    -e AZURE_SUBSCRIPTION_ID `
    -e LOCATION `
    -e CLUSTER_RESOURCE_GROUP `
    -e CLUSTER_NAME `
    --network host `
    -p 9001:9001 `
    -p 8080:8080 `
    oystenje/aks-container:0.0.1-dev `
    create

After the cluster is created you can connect to the cluster by replacing create with connect. You should now be able to run kubectl, flux, and helm commands against the cluster.

You can access the GitOps UI by running browse and navigate to http://localhost:9001. Username admin, password flux.

When you are done you can run the same command again, but now replace create with destroy.

Local development

For local development you must in addition set the following as environment variables:

export IMAGE_NAME="aks-container"
export IMAGE_TAG="0.0.1-dev"

Then you can run: ./buildAndRun create

This will build and run the image locally instead of pulling it from Docker hub.

Roadmap

aks-container's People

Contributors

oysteinje avatar

Watchers

 avatar

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.