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

fix eksctl getting started guide create cluster command #1362

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

bwagner5
Copy link
Contributor

1. Issue, if available:
N/A

2. Description of changes:
The getting started guide eksctl create cluster command is broken.

the current guide has the following:

eksctl create cluster << 'EOF'
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: ${CLUSTER_NAME}
  region: ${AWS_DEFAULT_REGION}
  version: "1.21"
  tags:
    karpenter.sh/discovery: ${CLUSTER_NAME}
managedNodeGroups:
  - instanceType: m5.large
    amiFamily: AmazonLinux2
    name: ${CLUSTER_NAME}-ng
    desiredCapacity: 1
    minSize: 1
    maxSize: 10
iam:
  withOIDC: true
EOF

if you run the above w/ --dry-run to see the generated config, the heredoc passed in does not apply and defaults are taken instead:

eksctl create cluster --dry-run << 'EOF'
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: ${CLUSTER_NAME}
  region: ${AWS_DEFAULT_REGION}
  version: "1.21"
  tags:
    karpenter.sh/discovery: ${CLUSTER_NAME}
managedNodeGroups:
  - instanceType: m5.large
    amiFamily: AmazonLinux2
    name: ${CLUSTER_NAME}-ng
    desiredCapacity: 1
    minSize: 1
    maxSize: 10
iam:
  withOIDC: true
EOF

... For brevity just showing one field that verifies it is using the default randomly generated cluster name rather than the spec in the heredoc...

metadata:
  name: exciting-creature-1645053433

This PR changes it to the following which works:

eksctl create cluster --dry-run -f - << EOF
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: ${CLUSTER_NAME}
  region: ${AWS_REGION}
  version: "1.21"
  tags:
    karpenter.sh/discovery: ${CLUSTER_NAME}
managedNodeGroups:
  - instanceType: m5.large
    amiFamily: AmazonLinux2
    name: ${CLUSTER_NAME}-ng
    desiredCapacity: 1
    minSize: 1
    maxSize: 10
iam:
  withOIDC: true
EOF

...again just showing metadata to verify it's picking up the spec...

metadata:
  name: my-cluster
  region: us-east-2
  tags:
    karpenter.sh/discovery: my-cluster

3. How was this change tested?

4. Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: link to issue
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Feb 16, 2022

✔️ Deploy Preview for karpenter-docs-prod ready!

🔨 Explore the source changes: 94c3bbb

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/620d87ce4bce3200075e6f7d

😎 Browse the preview: https://deploy-preview-1362--karpenter-docs-prod.netlify.app

Copy link
Contributor

@spring1843 spring1843 left a comment

Choose a reason for hiding this comment

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

LGTM thank you

@bwagner5 bwagner5 merged commit a301ce8 into aws:main Feb 16, 2022
@bwagner5 bwagner5 deleted the fix-eksctl branch February 16, 2022 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants