Skip to content
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

onDemandAllocationStrategy not respected #16457

Open
gerasym opened this issue Apr 8, 2024 · 1 comment
Open

onDemandAllocationStrategy not respected #16457

gerasym opened this issue Apr 8, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gerasym
Copy link

gerasym commented Apr 8, 2024

/kind bug

1. What kops version are you running? The command kops version, will display
this information.

Client version: 1.27.3

2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.

v1.26.13

3. What cloud provider are you using?

AWS

4. What commands did you run? What is the simplest way to reproduce this issue?

kops update cluster --yes

5. What happened after the commands executed?

The cluster was created with mixed instance group, but On-Demand allocation strategy is set to Prioritized

6. What did you expect to happen?
On-Demand allocation should be set to lowest-price according to instance group configuration

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.

apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
  creationTimestamp: "2024-04-08T13:48:48Z"
  labels:
    kops.k8s.io/cluster: f757d2313.ipsk8st.int.aws.mycompany.io
  name: default
spec:
  additionalSecurityGroups:
  - sg-1028723465823
  cloudLabels:
    k8s.io/cluster-autoscaler/enabled: ""
    k8s.io/cluster-autoscaler/f757d2313.ipsk8st.int.aws.mycompany.io: ""
    kops.k8s.io/instancegroup: default
    nodeType: workerDefault
  iam:
    profile: arn:aws:iam::987360431102:instance-profile/nodes.f757d2313.ipsk8st.int.aws.mycompany.io
  image: ami-09ed34464eb342d01
  instanceMetadata:
    httpPutResponseHopLimit: 1
    httpTokens: optional
  machineType: t3.medium
  maxSize: 4
  minSize: 0
  mixedInstancesPolicy:
    instances:
    - t3.medium
    - t3a.medium
    onDemandAboveBase: 50
    onDemandAllocationStrategy: lowest-price
    onDemandBase: 0
    spotAllocationStrategy: lowest-price
    spotInstancePools: 2
  nodeLabels:
    kops.k8s.io/instancegroup: default
  role: Node
  subnets:
  - eu-central-1a
  - eu-central-1b
  - eu-central-1c
  suspendProcesses:
  - AZRebalance

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?

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 8, 2024
@hakman
Copy link
Member

hakman commented Apr 11, 2024

Hi @gerasym. If you run kops update cluster do you see that it tries to change onDemandAllocationStrategy to lowest-price?
If you change it via AWS console, is it possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants