kubespray icon indicating copy to clipboard operation
kubespray copied to clipboard

cloud provider deprecated in kubelet 1.27+

Open YerisAntonio opened this issue 1 year ago • 9 comments

Hello!

the kubelet option --cloud-provider was deprecated in k8s 1.27. When you configure cloud provider in the inventory, (in my case aws), kubelet crashes "with unknown cloud provide: aws".

I tried adding POC code to kubespray for testing the new way to do this with "--image-credential-provider-bin-dir" and "--image-credential-provider-config" options and it worked fine for me.

YerisAntonio avatar Oct 03 '23 20:10 YerisAntonio

@YerisAntonio

Thanks to report it :-)

yankay avatar Oct 07 '23 02:10 yankay

I also coded an external Cloud Controller Manager to work around this. Not sure which is the "preferred" method, but my changes are here

ebarrere avatar Nov 06 '23 18:11 ebarrere

@ebarrere - does it modify the spec and add spec.providerID?

taraszka avatar Nov 08 '23 13:11 taraszka

/remove-kind bug /kind feature related : #9813

VannTen avatar Feb 08 '24 10:02 VannTen

Hello,

I also ran into the same problem trying to provision a cluster with kubespray 2.24.1 (k8s version 1.28).

After reading this thread, I am still puzzled how to progress. Is there currently a way to deploy k8s version 1.27+ with kubespray in aws? If so, could you please elaborate? How can I use the external provider cloud-provider-aws?

Thanks

kkantonop avatar Mar 05 '24 12:03 kkantonop

I was able to deploy a cluster using the fork linked in my previous comment, but beyond that I didn't do any testing.

ebarrere avatar Mar 05 '24 18:03 ebarrere

Hell all,

I managed to deploy the cluster with kubespray, setting cloud_provider: external. Then I installed aws-cloud-controller-manager through their helm chart.

To be honest I find that their official documentation is lacking a lot of necessary info, so I ended up troubleshooting from the errors in the logs, the help message of the tool also helped.

docker run --rm registry.k8s.io/provider-aws/cloud-controller-manager:v1.28.1 --help

Cheers!

kkantonop avatar Jun 05 '24 08:06 kkantonop