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

Remove envsubst dependency #669

Merged
merged 1 commit into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,28 @@ AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)

### Create a Cluster

Create a cluster with `eksctl`. The [example configuration](eksctl.yaml) file specifies a basic cluster (name, region), and an IAM role for Karpenter to use.
Create a cluster with `eksctl`. This example configuration file specifies a basic cluster with one initial node and sets up an IAM OIDC provider for the cluster to enable IAM roles for pods:

```bash
curl -fsSL https://karpenter.sh/docs/getting-started/eksctl.yaml \
| envsubst \
| eksctl create cluster -f -
cat <<EOF > cluster.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Iirc it's possible to pass the file directly to eksctl inline to avoid dropping a file on the local filesystem.

Copy link
Contributor Author

@bellkev bellkev Sep 9, 2021

Choose a reason for hiding this comment

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

It is and would work here. Personally I just always want to take a look at the config file before launching, because it takes like 20min to launch cluster + ng and some things are annoying to change later. I wouldn’t object to going back to the eksctl -f - option though. Also, sometimes multi-line pasting can subtly break depending on the terminal emulator, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency with the rest of the guide, I'd probably lean doing it all inline.

Personally I just always want to take a look at the config file before launching

I often edit them inline after pasting but before entering them.

Also, sometimes multi-line pasting can subtly break depending on the terminal emulator, etc.

This is a decent point, but at some point, there's only so much we can do to make this smooth with all user environments

---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: ${CLUSTER_NAME}
region: ${AWS_DEFAULT_REGION}
version: "1.20"
managedNodeGroups:
- instanceType: m5.large
amiFamily: AmazonLinux2
name: ${CLUSTER_NAME}-ng
desiredCapacity: 1
minSize: 1
maxSize: 10
iam:
withOIDC: true
EOF
eksctl create cluster -f cluster.yaml
```

This guide uses a self-managed node group to host Karpenter.
Expand Down
16 changes: 0 additions & 16 deletions website/content/en/docs/getting-started/eksctl.yaml

This file was deleted.