Giter Club home page Giter Club logo

docker-deploy-kubernetes's Introduction

paralin/deploy-kubernetes

Base docker image to deploy an app into Kubernetes using azk

Initial Considerations

This is heavily experimental. Not sure if I will complete it.

Versions (tags)

- [`latest, 0.0.1`](https://github.com/paralin/docker-deploy-kubernetes/blob/master/latest/Dockerfile)

Image content:

  • Ubuntu 14.04 (v0.0.1) or Alpine Linux (v0.0.2 or later)
  • kubelet

Configuration

The following environment variables are available for configuring the deployment using this image:

  • KUBE_NAMESPACE (optional, default: active context namespace): Namespace to deploy into.
  • LOCAL_PROJECT_PATH (optional, default: /azk/deploy/src): Project source code path;
  • LOCAL_KUBECONFIG_PATH(optional, default: /azk/deploy/.kube/config): Path to kubeconfig.
  • KUBE_CONTEXT (optional, default: default): Kube context to use from the kubeconfig file. Uses the active context on default.

Usage

Consider you want to deploy your app into a remote Kubernetes cluster and your local kubeconfig is placed at $HOME/.kube/config (the default).

Usage with azk

Example of using this image with azk:

  • Add the deploy system to your Azkfile.js:
/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */

// Adds the systems that shape your system
systems({
  // ...

  deploy: {
    image: {"docker": "paralin/deploy-kubernetes"},
    mounts: {
      "/azk/deploy/src":     path("."),
      "/azk/deploy/.kube":    path("#{env.HOME}/.kube"),
    },
    scalable: {"default": 0, "limit": 0},
  },
});
/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */

// Adds the systems that shape your system
systems({
  example: {
    // ...
    http: {
      domains: [
        // ...
        "#{env.HOST_DOMAIN}",
        "#{env.HOST_IP}"
      ]
    },
  },

  // ...
});
  • Run:
$ azk deploy

Usage with docker

To create the image paralin/deploy-kubernetes, execute the following command on the deploy-kubernetes image folder:

$ docker build -t paralin/deploy-kubernetes latest

To run the image:

$ docker run --rm --name deploy-kubernetes-run \
  -v $(pwd):/azk/deploy/src \
  -v $HOME/.kube:/azk/deploy/.kube \
  paralin/deploy-kubernetes

License

My Dockerfiles distributed under the Apache License.

docker-deploy-kubernetes's People

Contributors

paralin avatar

Stargazers

 avatar  avatar  avatar  avatar  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.