Code Monkey home page Code Monkey logo

k8s-aws's Introduction

k8s-aws

This is a kops wrapper script for creating Kubernetes clusters on AWS and maintaining them. Certain addons are also installed into newly created clusters:

  • Heapster
  • Kubernetes Dashboard
  • Elasticsearch/Fluentd/Kibana (EFK) logging stack
  • Prometheus Operator monitoring stack

The cluster is additionally set up with RBAC authorization for heightened security.

Requirements

We use Python 3. To install dependencies, issue the following command at the root of this project: pip3 install -r requirements.txt.

Secrets

Write your secrets in secrets.yaml, see secrets.yaml.sample.

Usage

The ./kops script supports a few subcommands and a number of arguments:

Create a Cluster

The create subcommand allows you to create a Kubernetes cluster within your AWS account.

Example:

./kops --aws_profile example create app staging [email protected] email-smtp.eu-west-1.amazonaws.com:587 example.com clusters.example.com

Logging

Kibana

In order to access Kibana, start kubectl --kubeconfig $KUBECONFIG proxy 8001 and open http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kibana-logging in your browser. The username/password is elastic/changeme.

Monitoring

We use Prometheus, via CoreOS' Prometheus Operator, as our monitoring solution. In addition to Prometheus Operator itself, we install the whole kube-prometheus stack that among other things ensures that the Kubernetes cluster itself and the host infrastructure are monitored.

Upgrading to a New Version

When upgrading to a newer version of the Prometheus Operator stack, we need to first upgrade Prometheus Operator itself (by applying its manifests). Once this is ready, we can apply the manifests for the rest of the stack. Prometheus Operator will take care of upgrading corresponding components in the cluster.

Visualization

We use Grafana for visualizing monitoring information.

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.