-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal Pod Autoscaler Label clash #10862
Comments
/kind bug |
Hi @timothyclarke , I think kOps does not want you to provide labels with prefix |
The validation is probably a bit overeager. The intention is to prevent people from setting labels that kOps depend on being set to a specific value. I do think people should be able to enable CAS auto discovery though. @timothyclarke would you be able to do a PR against the validation logic? I believe we probably want this in before kOps 1.20 GA. |
@olemarkus I'm sorry I'm not that skilled as a developer to review and fix this issue. I've been able to simplify the steps to replicate the issue that is completely independent of my PR.
There's probably a simpler method to reproduce but the above didn't need to create any of the resources in AWS to generate the error. The above steps only stages the changes.
If that label is removed then the changes will be applied (however the cluster autoscaler will no longer pickup the instance groups). |
Thanks for the info. That is what I need to fix this. PR incoming. |
@olemarkus
and when I finish
|
What is the reason for setting this label explicitly? |
It's for the AWS Ingress controller @olemarkus - following kops instructions here: |
Ouch. That looks dated and should be removed. https://kops.sigs.k8s.io/addons/#aws-load-balancer-controller should be used instead |
This is tight - kops 1.19 wasn't recognizing
for me, so I am planning to revisit the migration to the aws load balancer controller in 1.20, but I'm blocked in upgrading the cluster spec to kops 1.20 because of this reserved label issue. |
We need to leave some time to deprecate the AWS Ingress Controller. the link you sent says aws load balancer controller introduced to kops in 1.20 |
You don't actually need the cloud labels. this is handled by kOps and k8s, which is why it is marked as reserved. it is rather dangerous to add it like that. Those docs are quite old and I'd consider the content deprecated already. |
You mean I can just remove that label and it won't affect the ingress controller? |
Yes. That should work |
Hii @olemarkus The kubernetes cluster that i am running is 1.18.14 we are running airflow,postgres,dbt on it. We want to upgrade it to the latest version using the kops tool. My manager suggested that if we take such a huge leap from 1.18.14. to 1.23.5 our applications running on it might break and told me that we shall upgrade it to 1.18.17 first and we shall do it step by step. When i tried to edit the cluster i get the below error: Please let me how to resolve this and also please suggest me whether upgrading the kubernetes from 1.18.14 to 1.23.5 is a good option or will we break our applications? |
Hey. The recommendation is:
Doing a jump from k8s 1.18 to 1.23 will surely break things. |
Hi olemarkus, When i try to edit the cluster file in kops it says it is forbidden, so not able to change the version from 1.18.14 to 1.18.17. |
Can you file a new issue following the issue template? |
@prasanththorati
Repeat steps 3&4 until you're on a desired version (eg latest) |
As mentioned above, the appropriate kops version is always the latest that supports the current k8s version. For k8s 1.18 that is kops 1.23.1. |
1. What
kops
version are you running? The commandkops version
, will displaythis information.
Version 1.20.0-alpha.2
I'm working on adding features under #10706 however I think this bug is independant
2. What Kubernetes version are you running?
kubectl version
will print theversion if a cluster is running or provide the Kubernetes version specified as
a
kops
flag.Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
I do not believe the client version is applicable as the error is occurring as I am performing
kops edit cluster
3. What cloud provider are you using?
AWS
4. What commands did you run? What is the simplest way to reproduce this issue?
kops create cluster
your normal options +--cloud-labels "k8s.io/cluster-autoscaler/${KUBE_NAME}=owned"
Edit the cluster and replace the Classic Loadbalancer with a Network Loadbalancer.
In my case
I'm editing the yaml to add additional instance groups, set the auth etc
Followed by
After the cluster was up I edited the cluster to change the loadbalancer
5. What happened after the commands executed?
I received the error message
6. What did you expect to happen?
The cluster edit to not complain. i'd then need to apply the changes with
kops update cluster --yes
7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.
8. Please run the commands with most verbose logging by adding the
-v 10
flag.Paste the logs into this report, or in a gist and provide the gist link here.
9. Anything else do we need to know?
The text was updated successfully, but these errors were encountered: