Code Monkey home page Code Monkey logo

akb's Introduction

Total alerts Language grade: JavaScript Language grade: Python

Calico ACI Integration

This repo documents my steps to deploy a calico Cluster Integrated with ACI. I use Terraform to deploy the ACI configuration and spin up the required Virtual Machines.

ACI L3OUT design

The Calico cluster communicates with the ACI fabric via an External L3OUT. In order to simplify the configuration and support Virtual Machine Mobility the design will adopt use the floating L3OUT feature.

Floating L3 OUT Introduction

The floating L3Out feature enables you to configure a L3Out without specifying logical interfaces. The feature saves you from having to configure multiple L3Out logical interfaces to maintain routing when virtual machines (VMs) move from one host to another. Floating L3Out is supported for VMware vSphere Distributed Switch (VDS) with ACI 4.2.(1) and physical domains starting from ACI 5.0(1)

In order to keep the design as flexible as possible and not to dictate the Virtualisation Technology adopted the physical domain approach will be the one used even if the virtualisation environemnt is based on VMware. This is particularly convenient as will allow the user to mix of different Virtualisations and Bare Metal servers at the same time.

For more details on Floating L3 Out refer to the Cisco ACI Floating L3Out documentation.

Terminology refresher:

  • Anchor Node: Are the routers where the routing peering is formed. There is no requirement on the number of leaf switches acting as the anchor leaf node. As of ACI 5.1(3) an ACI leaf can have up to 400 BGP sessions.

  • Non-anchor Node: The non-anchor leaf node does not create any routing sessions for L3Out peering. It acts as a passthrough between the anchor node and the L3Out router. A non-anchor leaf node has the floating IP address and can have a floating secondary IP, if needed.. If it is a VMware vDS VMM domain, the floating IP address is deployed only when the virtual rotuer is connected to the leaf node. If it is a physical domain, and the leaf port uses AEP that has an L3Out domain associated to the floating L3Out, the floating IP address is deployed. The floating IP address is the common IP address for non-anchor leaf nodes. It is used to locate the router virtual machine (VM) if it moves behind any non-anchor leaf node through the data path.

  • Floating IP: A common internal IP for non anchor leaf nodes to communicate with anchor leaf node.

ACI design

The ACI configuration will follow the Floating L3OUT architecture described in the Cisco Application Centric Infrastructure Calico Design White Paper

The Kubernetes Cluster

The cluster is composed by 3 masters and N workers. The control plane redundancy is ensured by deploying HaProxy and KeepaliveD.

A few add-ons are also installed on the cluster:

  • Helm
  • Nginx Ingress
  • kubectl bash completion
  • kubernetes dashboard
  • Kustomize
  • metric server: the default config is modified to add the --kubelet-insecure-tls since all the certificates are self signed
  • Guestbook demo application exposed via ingress. Access via: http://ingress_ip/ this is not ideal, is just for demo purposes
  • Gold Pinger

UI

All the configurations can be done via the integrated webui. A VM with NKT and the K8s VMs tempalte is provided for convenience and can be downloaded from:

and imported in vCenter

If you prefer to run NKT on your server execture the startup.sh <port> script to start the webui on the selected port. The Ubuntu VM template needs to be manually downloaded and placed into the terraform/static/vm_templates folder.

The latest template can be downloaded from the following locations:

Visibility

A visualization tool ACI-Kubernetes-Visualiser is also deployed on the cluster. It is exposed as a service and can be used to visualize the cluster topology. Currently only ACI is supported.

Open Issues

  • L3OUT ECMP is used to load balance traffic to the services running in the cluster: Every node that has a POD for an exposed service will advertise a /32 host route for the service IP. Currently ACI does not support Resilient hashing for L3out ECMP. This means that if the number of ECMP paths are changed (scaling up/down a deploument could result in that as well as node failure) the flows can potentially be re-hashed to a different nodes resulting in connections resets. There is currently a feature request opened to support Resilient hashing for L3out ECMP: US9273

Advacned

Raspberry Pi testing

We have been testing NKT and VKACI on 3 Raspberry Pis nodes with Ubuntu 20.4. If you plan to test the same here a few tips:

  • Configure passwordless sudo
    • Edit sudoers file: sudo nano /etc/sudoers
    • Find a line which contains includedir /etc/sudoers.d
    • Below that line add: username ALL=(ALL) NOPASSWD: ALL
  • CRI-O supports ARM64 Ubuntu starting from v1.24
  • edit the /boot/firmware/cmdline.txt and enable the following options
    • cgroup_enable=cpuset
    • cgroup_enable=memory
    • cgroup_memory=1
  • Check the maximum MTU supported by the Rpi ethernet interfaces, not all support jumbo MTU. use ip -d link list and look for maxmtu
  • The APT Mirror MUST BE http://ports.ubuntu.com/
  • The Pi does not have a RTC (Real Time Clock) so every time is reloaded the time is set back to the build time, at least with Ubuntu 20.0.4. So it is mandatory to have NTP working even after the installation or the cluster will die after a reload as all the certificate will be invalid.

akb's People

Contributors

camrossi avatar dsx1123 avatar samiib avatar ddastoli avatar mntxca avatar cpaggen avatar vaneuk avatar lgtm-migrator avatar

Stargazers

 avatar  avatar Matyas Prokop avatar Inseob Kim avatar Jorge Gomez Velasquez avatar  avatar Rob Moss avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar George avatar  avatar  avatar

akb's Issues

K8s VM template

Currently the tool expects a VM template to be exisitng in the VCenter. This template will be used to clone VMs and install K8s. It would be nice if the app can embed the template image and in the workflow the user can request to create the VM template with the embedded image.

loadInput() should be page aware

loadInput() override the Cluster BGP AS value in the cluster_network because the HTML ID is called local_as for both the l3out page and the cluster_network page.

For now I did a quick fix and changed the HTML page to use k8s_local_as

do not create k8s cluster not working

when using the do not create k8s cluster option the system breaks as it cant find the directory to copy the calico files from.
need to fix the dir structure.

Fix Formatting for submit button

For some reason the formatting is not working very well anymore
image

Also the pop up/helper instead of showing (i) shows [] on Chrome on Linux

If you need to test you can run the application from BM-01 in the lab @mntxca

Make Dual Stack Optional

Currently the cluster is always a dual stack v4/v6 environment. This is not always needed and would be easier for the end use to have this as an optional feature.

tracking ER to add and remove leaves from L3out

this issue is to track the capability of the tool to allow adding and removing leaf switches from L3out after the initial execution of the tool.
ideally if a cluster exists, we should not load the 'existing_cluster' but rather give option to user to delete or modify existing cluster. If user wants to modify, then he/she will be prompted with the option to change the leaves configured for the L3out.

Remove Node Config

Since moving to the one AS per cluster there is no more need to have multiple Node Config.
The AS can be set at the BGPConfiguration

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.