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

Update default instance types for AWS #8282

Merged
merged 1 commit into from
Jan 18, 2020

Conversation

hakman
Copy link
Member

@hakman hakman commented Jan 6, 2020

While doing the setup for some e2e I noticed that Kops has still defaults to some quite old types of instances. Any reason for not changing to c5, t3? These should be cheaper and faster.

t3.medium - $0.041600 hourly
t2.medium - $0.046400 hourly
c5.large  - $0.085000 hourly
c4.large  - $0.100000 hourly

PS: m3.medium is so old that it becomes irrelevant.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 6, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @hakman. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 6, 2020
@hakman
Copy link
Member Author

hakman commented Jan 6, 2020

/cc @rifelpet
/cc @justinsb
@johngmyers

@@ -1345,13 +1345,13 @@ func (c *awsCloudImplementation) DefaultInstanceType(cluster *kops.Cluster, ig *
// Some regions do not (currently) support the m3 family; the c4 large is the cheapest non-burstable instance
// (us-east-2, ca-central-1, eu-west-2, ap-northeast-2).
// Also some accounts are no longer supporting m3 in us-east-1 zones
candidates = []string{"m3.medium", "c4.large"}
candidates = []string{"c5.large", "c4.large", "m3.medium"}
Copy link
Member

@johngmyers johngmyers Jan 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we want to consider a t3.large or t3.medium instead. We're more likely to be memory constrained.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t3.* has CPU credits and may be throttled on master startup. Also, it has slower throttled network. Should be ok for a small clusters. If we see issues, I would go with m5.large.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's reasonable to tune the defaults for small clusters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t3.* default to unlimited, so won't be CPU throttled on startup. If the CPU utilization is at or below the baseline over the 24 hour period (or lifetime) then there won't be an overage charge. The only issues would seem to be the slower network or the possibility of higher cost if the CPU is used at a high sustained rate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about the part of Unlimited by default. In this case, it may be a good idea to set t3.medium as default for masters also. It should stay around 10% CPU usage, which is not charged extra. Network throttling is not so bad for a small cluster (baseline is 0,25 Gbit/s).

@rifelpet
Copy link
Member

rifelpet commented Jan 6, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 6, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 7, 2020
Copy link
Member

@johngmyers johngmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hakman
Copy link
Member Author

hakman commented Jan 8, 2020

/assign @justinsb

@johngmyers
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 13, 2020
@justinsb
Copy link
Member

I agree with these changes - but we should make a release note!

I'm also not sure if we want to gate this on kubernetes version (or if we even can). It's an odd case because it's only for newly created clusters, but still if people are doing kops create cluster in a CI job or something, this is a change, albeit a good one likely.

Let's just confirm the details in office hours today!

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 18, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 18, 2020
@hakman
Copy link
Member Author

hakman commented Jan 18, 2020

/retest

1 similar comment
@hakman
Copy link
Member Author

hakman commented Jan 18, 2020

/retest

@johngmyers
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 18, 2020
@rifelpet
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman, rifelpet

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 18, 2020
@k8s-ci-robot k8s-ci-robot merged commit 985a71a into kubernetes:master Jan 18, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 18, 2020
@hakman hakman deleted the ec2-instance-types branch January 19, 2020 19:18
k8s-ci-robot added a commit that referenced this pull request Feb 29, 2020
…pstream-release-1.17

Automated cherry pick of #8282: Set the default instance type to t3.medium for AWS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants