linode / linode-cloud-controller-manager

Kubernetes Cloud Controller Manager for Linode
Apache License 2.0
83 stars 61 forks source link

CCM does not integrate with a K3s cluster #68

Closed Rajakavitha1 closed 2 years ago

Rajakavitha1 commented 4 years ago

General:


Bug Reporting

Linode CCM does not get integrated with the K3s cluster.

Steps to reproduce the problem

Provision a K3s master on Ubuntu 18.04 Linode with the following:

  1. K3s master with the following agruments:
    
    export KUBELET_EXTRA_ARGS=--cloud-provideer=external
    export KUBELET_EXTRA_ARGS=--provider-id=linode://$20216373
    export K3S_KUBECONFIG_MODE="644"
    export INSTALL_K3S_EXEC=" --no-deploy servicelb --disable-cloud-controller "
    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
    curl -sfL https://get.k3s.io | sh -
2. Run the following : `kubectl get pods --namespace kube-system`
Output is:

NAME READY STATUS RESTARTS AGE local-path-provisioner-58fb86bdfd-855vg 1/1 Running 0 15h metrics-server-6d684c7b5-wv5s8 1/1 Running 0 15h helm-install-traefik-hnbqq 0/1 Completed 0 15h coredns-6c6bb68b64-qhpn4 1/1 Running 0 15h traefik-7b8b884c8-9wnz6 1/1 Running 0 15h

3. Deploy ccm-linode.yaml using: `kubectl apply -f ccm-linode.yaml`
output is simialr to:

secret/ccm-linode created serviceaccount/ccm-linode created clusterrolebinding.rbac.authorization.k8s.io/system:ccm-linode created daemonset.apps/ccm-linode created

4. Deploy a K3s agent with the following:

export K3S_KUBECONFIG_MODE="644" export K3S_URL="https://45.79.120.176:6443" export K3S_TOKEN="K1007cc0062e2e7d06dabf7365d59a016043a8aea9677ebee9e4b433b19efde31ef::server:89baaaf06ce09843905f2dcb81ca8852" export KUBELET_EXTRA_ARGS=--cloud-provideer=external export KUBELET_EXTRA_ARGS=--provider-id=linode://$20216573


5. Deploy drupal, and check the service using: `kubectl get services drupal`
output is similar to:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE drupal LoadBalancer 10.0.0.89 8081:31809/TCP 33m

### Expected Behavior
The output should be similar to:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE drupal LoadBalancer 10.0.0.89 192.0.2.0 8081:31809/TCP 33m



and a nodebalancer should be created in the cloud manager.
### Actual Behavior

### Environment Specifications
20216373 and 20216573 are the Linode ids for the master and agent

#### Screenshots, Code Blocks, and Logs

#### Additional Notes

----

For general help or discussion, join the [Kubernetes Slack team](https://kubernetes.slack.com/messages/CD4B15LUR/details/) channel `#linode`. To sign up, use the [Kubernetes Slack inviter](http://slack.kubernetes.io/).

The [Linode Community](https://www.linode.com/community/questions/) is a great place to get additional support.
ikatergaris commented 2 years ago

Did anybody get back to you about this one? I'm having same issue. This is a logged in the ccm-linode pod logs every five minutes

I0321 20:39:31.437982 1 controller.go:368] Ensuring load balancer for service kube-system/traefik I0321 20:39:31.438254 1 event.go:291] "Event occurred" object="kube-system/traefik" kind="Service" apiVersion="v1" type="Normal" reason="EnsuringLoadBalancer" message="Ensuring load balancer" I0321 20:39:31.438275 1 event.go:291] "Event occurred" object="kube-system/traefik" kind="Service" apiVersion="v1" type="Warning" reason="UnAvailableLoadBalancer" message="There are no available nodes for LoadBalancer" E0321 20:39:31.583257 1 controller.go:275] error processing service kube-system/traefik (will retry): failed to ensure load balancer: [400] [configs[0].nodes] nodes is required; [configs[1].nodes] nodes is required I0321 20:39:31.583360 1 event.go:291] "Event occurred" object="kube-system/traefik" kind="Service" apiVersion="v1" type="Warning" reason="SyncLoadBalancerFailed" message="Error syncing load balancer: failed to ensure load balancer: [400] [configs[0].nodes] nodes is required; [configs[1].nodes] nodes is required"

My only difference. I didn't set this: export KUBELET_EXTRA_ARGS=--provider-id=linode://$20216573

ikatergaris commented 2 years ago

Turns out it does need KUBELET_EXTRA_ARGS=--provider-id=linode://$20216573, without the $ sign.. So; KUBELET_EXTRA_ARGS=--provider-id=linode://(linode-node-id,-of-node-you-are-joining) The complaint about missing nodes, was for no agents existing. Once I added an agent node, the ccm, did create a load balancer automatically. So collectively, this is a none issue I think and can be closed.

Rajakavitha1 commented 2 years ago

Turns out it does need KUBELET_EXTRA_ARGS=--provider-id=linode://$20216573, without the $ sign.. So; KUBELET_EXTRA_ARGS=--provider-id=linode://(linode-node-id,-of-node-you-are-joining) The complaint about missing nodes, was for no agents existing. Once I added an agent node, the ccm, did create a load balancer automatically. So collectively, this is a none issue I think and can be closed.

Thank you so much @ikatergaris!!!!

Rajakavitha1 commented 2 years ago

Marking this issue as closed as suggested by @ikatergaris