Skip to content

Commit 6b48ce2

Browse files
authored
redo markdown updates (#2)
* redo markdown updates * TCX5 waiver
1 parent f70ab0a commit 6b48ce2

File tree

9 files changed

+181
-9491
lines changed

9 files changed

+181
-9491
lines changed

docs/attributes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:tcx5-waiver: pass:[ ]

docs/book.html

Lines changed: 0 additions & 9393 deletions
This file was deleted.

docs/clusters/addons.adoc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ eksctl create addon -f config.yaml
8989
eksctl create addon --name vpc-cni --version 1.7.5 --service-account-role-arn <role-arn>
9090
----
9191

92+
[,console]
93+
----
94+
eksctl create addon --name aws-ebs-csi-driver --namespace-config 'namespace=custom-namespace'
95+
----
96+
97+
[TIP]
98+
====
99+
Use the `--namespace-config` flag to deploy addons to a custom namespace instead of the default namespace.
100+
====
101+
92102
During addon creation, if a self-managed version of the addon already exists on the cluster, you can choose how potential `configMap` conflicts shall be resolved by setting `resolveConflicts` option via the config file, e.g.
93103

94104
[,yaml]
@@ -195,6 +205,7 @@ addons:
195205
====
196206
Bear in mind that when addon configuration values are being modified, configuration conflicts will arise.
197207
====
208+
198209
Thus, we need to specify how to deal with those by setting the `resolveConflicts` field accordingly.
199210
As in this scenario we want to modify these values, we'd set `resolveConflicts: overwrite`.
200211

@@ -216,6 +227,41 @@ eksctl get addon --cluster my-cluster --output yaml
216227
Version: v1.8.7-eksbuild.3
217228
----
218229

230+
== Using custom namespace
231+
A custom namespace can be provided in the configuration file during the creation of addons. A namespace can't be updated once an addon is created.
232+
233+
=== Using config file
234+
[,yaml]
235+
----
236+
addons:
237+
- name: aws-ebs-csi-driver
238+
version: latest
239+
namespaceConfig:
240+
namespace: custom-namespace
241+
----
242+
243+
=== Using CLI flag
244+
Alternatively, you can specify a custom namespace using the `--namespace-config` flag:
245+
[,console]
246+
----
247+
eksctl create addon --cluster my-cluster --name aws-ebs-csi-driver --namespace-config 'namespace=custom-namespace'
248+
----
249+
250+
The get command will also retrieve the namespace value for the addon
251+
[,yaml]
252+
----
253+
- ConfigurationValues: ""
254+
IAMRole: ""
255+
Issues: null
256+
Name: aws-ebs-csi-driver
257+
NamespaceConfig:
258+
namespace: custom-namespace
259+
NewerVersion: ""
260+
PodIdentityAssociations: null
261+
Status: ACTIVE
262+
Version: v1.47.0-eksbuild.1
263+
----
264+
219265
[[update-addons,update-addons.title]]
220266
== Updating addons
221267

@@ -231,6 +277,9 @@ eksctl update addon -f config.yaml
231277
eksctl update addon --name vpc-cni --version 1.8.0 --service-account-role-arn <new-role>
232278
----
233279

280+
[NOTE]
281+
The namespace configuration cannot be updated once an addon is created. The `--namespace-config` flag is only available during addon creation.
282+
234283
Similarly to addon creation, When updating an addon, you have full control over the config changes that you may have previously applied on that add-on's `configMap`. Specifically, you can preserve, or overwrite them. This optional functionality is available via the same config file field `resolveConflicts`. e.g.,
235284

236285
[,yaml]

docs/clusters/eksctl-karpenter.adoc

Lines changed: 60 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
= Karpenter Support
55
:info_doctype: section
66

7-
`eksctl` supports adding https://karpenter.sh/[Karpenter] to a newly created cluster. It will create all the necessary
7+
`eksctl` provides support for adding https://karpenter.sh/[Karpenter] to a newly created cluster. It will create all the necessary
88
prerequisites outlined in Karpenter's https://karpenter.sh/docs/getting-started/[Getting Started] section including installing
9-
Karpenter itself using Helm. We currently support installing versions starting `0.20.0` and above.
9+
Karpenter itself using Helm. We currently support installing versions `0.28.0+`. See the https://karpenter.sh/docs/upgrading/compatibility/[Karpenter compatibility] section for further details.
1010

11-
Use the `eksctl` cluster config field `karpenter` to install and configure it.
12-
13-
The following yaml outlines a typical installation configuration:
11+
The following cluster configuration outlines a typical Karpenter installation:
1412

1513
[,yaml]
1614
----
@@ -20,14 +18,14 @@ kind: ClusterConfig
2018
metadata:
2119
name: cluster-with-karpenter
2220
region: us-west-2
23-
version: '1.24'
21+
version: '1.32' # requires a version of Kubernetes compatible with Karpenter
2422
tags:
2523
karpenter.sh/discovery: cluster-with-karpenter # here, it is set to the cluster name
2624
iam:
2725
withOIDC: true # required
2826

2927
karpenter:
30-
version: 'v0.20.0' # Exact version must be specified
28+
version: '1.2.1' # Exact version should be specified according to the Karpenter compatibility matrix
3129

3230
managedNodeGroups:
3331
- name: managed-ng-1
@@ -42,45 +40,77 @@ to be set:
4240
[,yaml]
4341
----
4442
karpenter:
45-
version: 'v0.20.0'
43+
version: '1.2.1'
4644
createServiceAccount: true # default is false
4745
defaultInstanceProfile: 'KarpenterNodeInstanceProfile' # default is to use the IAM instance profile created by eksctl
4846
withSpotInterruptionQueue: true # adds all required policies and rules for supporting Spot Interruption Queue, default is false
4947
----
5048

5149
OIDC must be defined in order to install Karpenter.
5250

53-
Once Karpenter is successfully installed, add a https://karpenter.sh/docs/concepts/provisioners/[Provisioner] so Karpenter
54-
can start adding the right nodes to the cluster.
51+
Once Karpenter is successfully installed, add https://karpenter.sh/docs/concepts/nodepools/[NodePool(s)] and https://karpenter.sh/docs/concepts/nodeclasses/[NodeClass(es)] to allow Karpenter
52+
to start adding nodes to the cluster.
53+
54+
The NodePool's `nodeClassRef` section must match the name of an `EC2NodeClass`. For example:
5555

56-
The provisioner's `instanceProfile` section must match the created `NodeInstanceProfile` role's name. For example:
56+
[,yaml]
57+
----
58+
apiVersion: karpenter.sh/v1
59+
kind: NodePool
60+
metadata:
61+
name: example
62+
annotations:
63+
kubernetes.io/description: "Example NodePool"
64+
spec:
65+
template:
66+
spec:
67+
requirements:
68+
- key: kubernetes.io/arch
69+
operator: In
70+
values: ["amd64"]
71+
- key: kubernetes.io/os
72+
operator: In
73+
values: ["linux"]
74+
- key: karpenter.sh/capacity-type
75+
operator: In
76+
values: ["on-demand"]
77+
- key: karpenter.k8s.aws/instance-category
78+
operator: In
79+
values: ["c", "m", "r"]
80+
- key: karpenter.k8s.aws/instance-generation
81+
operator: Gt
82+
values: ["2"]
83+
nodeClassRef:
84+
group: karpenter.k8s.aws
85+
kind: EC2NodeClass
86+
name: example # must match the name of an EC2NodeClass
87+
----
5788

5889
[,yaml]
5990
----
60-
apiVersion: karpenter.sh/v1alpha5
61-
kind: Provisioner
91+
apiVersion: karpenter.k8s.aws/v1
92+
kind: EC2NodeClass
6293
metadata:
63-
name: default
94+
name: example
95+
annotations:
96+
kubernetes.io/description: "Example EC2NodeClass"
6497
spec:
65-
requirements:
66-
- key: karpenter.sh/capacity-type
67-
operator: In
68-
values: ["on-demand"]
69-
limits:
70-
resources:
71-
cpu: 1000
72-
provider:
73-
instanceProfile: eksctl-KarpenterNodeInstanceProfile-${CLUSTER_NAME}
74-
subnetSelector:
75-
karpenter.sh/discovery: cluster-with-karpenter # must match the tag set in the config file
76-
securityGroupSelector:
77-
karpenter.sh/discovery: cluster-with-karpenter # must match the tag set in the config file
78-
ttlSecondsAfterEmpty: 30
98+
role: "eksctl-KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name
99+
subnetSelectorTerms:
100+
- tags:
101+
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name
102+
securityGroupSelectorTerms:
103+
- tags:
104+
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name
105+
amiSelectorTerms:
106+
- alias: al2023@latest # Amazon Linux 2023
79107
----
80108

81-
Note that unless `defaultInstanceProfile` is defined, the name used for `instanceProfile` is
82-
`eksctl-KarpenterNodeInstanceProfile-<cluster-name>`.
109+
Note that you must specify one of `role` or `instanceProfile` for lauch nodes. If you choose to use `instanceProfile`
110+
the name of the profile created by `eksctl` follows the pattern: `eksctl-KarpenterNodeInstanceProfile-<cluster-name>`.
83111

84112
## Automatic Security Group Tagging
85113

86114
`eksctl` automatically tags the cluster's shared node security group with `karpenter.sh/discovery` when both Karpenter is enabled (`karpenter.version` specified) and the `karpenter.sh/discovery` tag exists in `metadata.tags`. This enables AWS Load Balancer Controller compatibility.
115+
116+
Note with karpenter 0.32.0+, Provisioners have been deprecated and replaced by https://karpenter.sh/docs/concepts/nodepools/[NodePool].

docs/iam/iam-policies.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ nodeGroups:
9292
attachPolicyARNs:
9393
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
9494
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
95-
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
95+
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPullOnly
9696
- arn:aws:iam::aws:policy/ElasticLoadBalancingFullAccess
9797
- arn:aws:iam::1111111111:policy/kube2iam
9898
withAddonPolicies:
9999
autoScaler: true
100100
imageBuilder: true
101101
----
102102

103-
WARNING: If a nodegroup includes the `attachPolicyARNs` it *must* also include the default node policies, like `AmazonEKSWorkerNodePolicy`, `AmazonEKS_CNI_Policy` and `AmazonEC2ContainerRegistryReadOnly` in this example.
103+
WARNING: If a nodegroup includes the `attachPolicyARNs` it **must** also include the default node policies, like `AmazonEKSWorkerNodePolicy`, `AmazonEKS_CNI_Policy` and `AmazonEC2ContainerRegistryPullOnly` in this example.

docs/iam/minimum-iam-policies.adoc

Lines changed: 8 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
[#minimum-iam-policies]
33
= Minimum IAM policies
44

5+
include::../attributes.txt[]
6+
57
This document describes the minimum IAM policies needed to run the main use cases of eksctl. These are the ones used to
68
run the integration tests.
79

@@ -14,73 +16,18 @@ An AWS Managed Policy is created and administered by AWS. You cannot change the
1416

1517
*AmazonEC2FullAccess (AWS Managed Policy)*
1618

17-
----
18-
{
19-
"Version": "2012-10-17",
20-
"Statement": [
21-
{
22-
"Action": "ec2:*",
23-
"Effect": "Allow",
24-
"Resource": "*"
25-
},
26-
{
27-
"Effect": "Allow",
28-
"Action": "elasticloadbalancing:*",
29-
"Resource": "*"
30-
},
31-
{
32-
"Effect": "Allow",
33-
"Action": "cloudwatch:*",
34-
"Resource": "*"
35-
},
36-
{
37-
"Effect": "Allow",
38-
"Action": "autoscaling:*",
39-
"Resource": "*"
40-
},
41-
{
42-
"Effect": "Allow",
43-
"Action": "iam:CreateServiceLinkedRole",
44-
"Resource": "*",
45-
"Condition": {
46-
"StringEquals": {
47-
"iam:AWSServiceName": [
48-
"autoscaling.amazonaws.com",
49-
"ec2scheduled.amazonaws.com",
50-
"elasticloadbalancing.amazonaws.com",
51-
"spot.amazonaws.com",
52-
"spotfleet.amazonaws.com",
53-
"transitgateway.amazonaws.com"
54-
]
55-
}
56-
}
57-
}
58-
]
59-
}
60-
----
19+
link:https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonEC2FullAccess.html[View AmazonEC2FullAccess policy definition.]
6120

6221
*AWSCloudFormationFullAccess (AWS Managed Policy)*
6322

64-
----
65-
{
66-
"Version": "2012-10-17",
67-
"Statement": [
68-
{
69-
"Effect": "Allow",
70-
"Action": [
71-
"cloudformation:*"
72-
],
73-
"Resource": "*"
74-
}
75-
]
76-
}
77-
----
23+
link:https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCloudFormationFullAccess.html[View AWSCloudFormationFullAccess policy definition.]
7824

7925
*EksAllAccess*
8026

27+
[source,json,subs="verbatim,attributes"]
8128
----
8229
{
83-
"Version": "2012-10-17",
30+
"Version": "2012-10-17",{tcx5-waiver}
8431
"Statement": [
8532
{
8633
"Effect": "Allow",
@@ -119,9 +66,10 @@ An AWS Managed Policy is created and administered by AWS. You cannot change the
11966

12067
*IamLimitedAccess*
12168

69+
[source,json,subs="verbatim,attributes"]
12270
----
12371
{
124-
"Version": "2012-10-17",
72+
"Version": "2012-10-17",{tcx5-waiver}
12573
"Statement": [
12674
{
12775
"Effect": "Allow",

0 commit comments

Comments
 (0)