Git Product home page Git Product logo

kubernetes-config's Introduction

Kubernetes-config

All the Kubernetes manifest files required to deploy whatever we're running.

Ingress manifests assume that the nginx ingress contriller is installed on the cluster:

helm install stable/nginx-ingress --namespace kube-system

To also enable autoscaling and resource limits / requests:

helm install stable/nginx-ingress --namespace kube-system -f nginx-ingress-values.yaml

kube-lego is used for automated Let's Encrypt certs:

helm install stable/kube-lego --namespace kube-system \
  --set config.LEGO_EMAIL={your_email} \
  --set config.LEGO_URL=https://acme-v01.api.letsencrypt.org/directory
  --set rbac.create=true  (if RBAC is enabled)

Metrics services

Prometheus

Note: Prometheus is included in the istio helm chart by default

Prometheus from Helm chart, rbac needs to be off if using older aks or :

helm install --name promy stable/prometheus --set rbac.create=true --set alertmanager.persistentVolume.storageClass=azurefile --set server.persistentVolume.storageClass=managed-standard --namespace data

Kubernetes metrics server for pod autoscaling

For some bizzarre reason, aks doesn't deploy with the default metrics-server included which is needed for horizontal pod autoscaling; it can be deployed manually from https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy/1.8%2B

Node autoscaling

node autoscaling (for aks, minimum k8s v1.10): https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/azure/cluster-autoscaler-containerservice.yaml just need to:

  • fill out the secrets part,
  • replace {{ ca_version }} with autoscaler version (at least 1.2 for azure), and
  • replace --nodes=3:10:nodepool1 the min/max node count and node pool name.

The README provides directions on fetching all of that.

Istio

From istio release:

helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set certmanager.enabled=true

additional options: https://istio.io/docs/reference/config/installation-options/

By default this will intall the sidecar auto-injector, to use it a namespace will need to be properly labeled, for example:

kubectl label namespace prod istio-injection=enabled

Notes for deployment, service, etc. manifests for use with istio:

  • Service ports need to have names
  • ClusterIP type Services need to not be headless if it is to accept ingress gateway traffic - that is, it must not have clusterIP: None
  • Deployments need version labels, such as version: v1
  • By default with the helm install mutual tls will be enabled which will prevent any inter-service communication unless an appropriate DestinationRule is set up
  • Istio / envoy doesn't seem to support let's encrypt certs, that whole area seems to be left as an excercise for the user, but ignoring the istio ingress and using the same nginx-ingress from the first part of this readme with cert-manager does seem to work.

kubernetes-config's People

Contributors

markwooff avatar phanoix avatar ryanlacroix avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubernetes-config's Issues

postgres backup job

Create k8s jobs to handle daily automated postgres backups (for account), using pg_dump > compress > put into blob storage.

data volume backup jobs

Create k8s jobs to handle daily automated data volume backups (all prod ones), most likely stored compressed in blob storage.

  • wiki
  • account
  • collab

Set up some gitops

Use fluxcd to continuously deploy based on some directories in this repo.

Create concierge helm chart

The current account deployments should be obtainable with values-prod.yaml / values-dev.yaml.
This chart is also likely to be a dependency for many others so that should be considered.

mongo backup job

Create k8s job to handle daily automated postgres backups (for message), probably using mongodump and pushing the compressed backup into blob storage.

Research what parts of istio are usable with aks

Which parts of istio are currently unusable in aks?

  • SDS is necessary for fetching, storing and mounting let'sencrypt tls secrets, not having this means no istio ingress and everything that is enabled by it.
  • this seems to be the only big thing, but it invalidates a large part of istio that relies on ingress / gatweays.
    conclusion: maybe linkerd is a simpler and easier to set up and maintain option

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.