Giter Club home page Giter Club logo

infra-ansible-kubernetes's Introduction

infra-ansible-kubernetes

My automated infrastructure deployment

  1. automates kubernetes deployment (Based on mmumshad/kubernetes-the-hard-way)
    • Note: cni pod networking, dns, ingress controller, and loadbalancer are not yet included in code.
  2. also has glusterfs -- Not yet finished.

Steps:

  1. Create the topology in both
    • inventory.yaml and config/certs/generate_all.sh
    • Nodes will be needed for etcd, control plane, load balancer, and worker nodes.
  2. config/certs/generate_all.sh ansible-playbook -i inventory.yaml playbooks/kubernetes/*
  3. etcd.yaml
  4. control_plane.yaml
  5. load_balancer.yaml
  6. worker_pre.yaml either:
  7. worker.yaml or (if with tls-bootstratpping) (currently not working)
  8. tls_bootstrapping.yaml
  9. worker_with_tls_bootstrap.yaml
  10. kubectl apply -f kube-flannel CNI pod networking
  11. init_rbac_kubelet_authorization.yaml
  12. kubectl apply -f coredns.yaml
  13. istioctl install --set profile=default -f ../istio_examples/overrides.yaml
  14. kubectl apply -f metallb-native.yaml
    • Note about WA: kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io metallb-webhook-configuration

Things to improve:

  1. server, node0, and node1 are still hardcoded names and is set in my router's dns settings. The scripts needs to adapt based on the inventory file. Currently, this wont work when I provision my next 2 (3+3) raspberry pi 5 cluster. I think majority of that work should is on the certs and kubeconfig generation.
  2. DNS stuff. I am bound by my ISP's provided router-- Orange funbox. Setting the DNS names here are less than ideal (dashes are not supported and subdomains does not work). It also doesn't have support for alternative DNS provides. So additional configuration is needed if I want to have private DNS servers (like making it a DHCP server also).
  3. The generation of certificates and kubeconfig needs to be "ansible-fy". It is handled by bash scripts.
  4. Refactor "init_server.yaml" to be 3 multiple playbooks. Currently, all of the functionalities of server (api-server, controller-manager, and scheduler) are all in one playbook. But in production environments these can be ran on different hosts and it should be decoupled for flexibility.
  5. Encryption at rest is still not implemented.
  6. Override ~/.kube/config generation behavior.
  7. Refactor glusterfs provisioning code. It feels like the vars are unorganized and the playbooks are a mess
  8. Add revert counterparts to glusterfs playbooks.

infra-ansible-kubernetes's People

Contributors

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