Giter Site home page Giter Site logo

Running it along with Calico about kilo HOT 13 OPEN

squat avatar squat commented on May 22, 2024
Running it along with Calico

from kilo.

Comments (13)

squat avatar squat commented on May 22, 2024 9

Implementing Calico compatibility is possible (and used to be in the repo) however it was recently taken out because Calico’s default IPAM method was changed so that it no longer uses the podCIDR allocated by the K8s node controller.

To support this, Kilo will need to add a Calico client and read Calico IPPool CRs to determine the subnets allocated to each node.

If you’d like to give re-implementing it a shot, please let me know; I would be happy to review a PR. Otherwise, it’s high on my list for the project.

from kilo.

outbackdingo avatar outbackdingo commented on May 22, 2024 2

any further progress on this?

from kilo.

mazzy89 avatar mazzy89 commented on May 22, 2024

Thank you for replying. I'd be happy to give it a shot and see what I can do about that. Any suggestions to start?

from kilo.

aboutte avatar aboutte commented on May 22, 2024

My understanding that this effort will block using Kilo on GKE, is that correct?

from kilo.

baurmatt avatar baurmatt commented on May 22, 2024

We're also interested in in seeing this implemented! Our use case is to leverage the VPN feature to build site-to-site VPN for connecting legacy service with a Kubernetes cluster.

from kilo.

unixfox avatar unixfox commented on May 22, 2024

My understanding that this effort will block using Kilo on GKE, is that correct?

Yes it will, unfortunately kilo can't be deployed on GKE at the moment.

from kilo.

KlavsKlavsen avatar KlavsKlavsen commented on May 22, 2024

No progress on this? :(

from kilo.

outbackdingo avatar outbackdingo commented on May 22, 2024

yeah can we get calico suport, alot of us have non-GKE environments

from kilo.

abh1kg avatar abh1kg commented on May 22, 2024

Was there any progress on this?

from kilo.

aspekt112 avatar aspekt112 commented on May 22, 2024

Running Kilo on top of a GKE cluster is still not possible?

from kilo.

mazocode avatar mazocode commented on May 22, 2024

Can't we just re-add calico compatibility as it is in case the podCIDDR is the only issue? Calico IPools are great to have subnets per site and use different site specific or top of rack BGP peers. The IP block assigned to a node is stored in a BlockAffinity CR. We are using a script to update the podCIDR from the generated blockaffinity after a new node joined so in our case this would always match.

It is somewhat hacky but this is what we do to fix this issue:

nodeList=$(kubectl get nodes -o jsonpath='{.items[*].metadata.name}')

for node in $nodeList; do
    echo -n "* Node $node..."
    calicoName=$(kubectl get blockaffinities -o jsonpath='{.items[*].metadata.name}' | tr " " "\n" | awk "/$node/ {print $1}")
    echo -n " subnet=${calicoName}"
    calicoCIDR=$(kubectl get blockaffinities $calicoName -o jsonpath='{.spec.cidr}')
    echo -n ", ${calicoCIDR}"
    podCIDR=$(kubectl get node $node -o jsonpath='{.spec.podCIDR}')
    echo -n " == ${podCIDR}"
    if [ "${podCIDR}" == "${calicoCIDR}" ]; then
        echo " OK"
        continue
    fi
    if [ -z "${calicoCIDR}" ]; then
        echo " ERROR"
        echo "  Could not determine calico CIDR. Did you switch the nodes site? In this case make"
        echo "  sure there is only one blockaffinity object for this node."
        continue
    fi
    echo " ERROR"
    echo
    echo "!!!WARNING: Continuing might disrupt workloads running on the node!!!"
    echo
    echo -n "Shall we continue to fix it now (node should be drained before)? [y/n]? "
    read a
    if [ "$a" != "y" ]; then
        continue
    fi

    echo "Saving node yaml to ~/${node}.yaml..."
    kubectl get node $node -o yaml >~/${node}.yaml

    echo "Replacing CIDR (s/${podCIDR}/${calicoCIDR}/)..."
    sed -i "s/${podCIDR/\//\\/}/${calicoCIDR/\//\\/}/" ~/${node}.yaml
    echo "Deleting node..."
    kubectl delete node $node
    kubectl create -f ~/${node}.yaml

    echo "FIXED!"
done

from kilo.

splitice avatar splitice commented on May 22, 2024

This is a blocker for usage with LKE (linode) too.

from kilo.

freexploit avatar freexploit commented on May 22, 2024

I made subnet being able to use podCIDR querying calico blockaffinity resource. That made calico start, and this non-ready node error is not showing anymore. Now I'm trying to understand the calico compatibility layer you wrote to see if I can make it work.

from kilo.

Related Issues (20)

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.