rancherfederal / rke2-aws-tf

MIT License
82 stars 69 forks source link

Route Controller error listing routes filling up kube-controller logs #25

Closed chadningle closed 1 year ago

chadningle commented 3 years ago

The k8s ccm route-controller is querying the AWS API every 10 seconds, which is a normal interval, with DescribeRouteTables with no Request Parameters nor Filtering. The documentation says it is supposed to us a tag filter when querying but cloudtrail doesn't seem to agree.

"requestParameters": {
    "routeTableIdSet": {},
    "filterSet": {}
},
  1. Clone the repo and run the cloud-enabled example.
  2. SSH to a Master node.
  3. tail -f /var/log/containers/kube-controller-(tab to completion)

2020-12-16T16:30:36.981841663Z stderr F E1216 16:30:36.981657 1 route_controller.go:118] Couldn't reconcile node routes: error listing routes: found multiple matching AWS route tables for AWS cluster: kubernetes

Is there a way we can disable the route-controller in the k8s ccm that rke2 is using? The k8s fix for this is to set this in the yaml in the controller command section: - --configure-cloud-routes=false

https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/

these flags will vary for every cloud provider

    - --allocate-node-cidrs=true
    - --configure-cloud-routes=true
    - --cluster-cidr=172.17.0.0/16
AbrohamLincoln commented 3 years ago

Adding this line to the rke2_config variable resolved this for me:

kube-controller-manager-arg: "configure-cloud-routes=false"
aleiner commented 1 year ago

Closing as a result of AbrohamLincoln's comment.