-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of Readme File for Helm Chart (#263)
* ADDED README FILE * Removed Extra nodepool yaml file, fixed spacing * Added example field and comments in values.yaml * Add comments in ReadMe File * Modifed README file * Added example in README file * Added Example folder and modified README file
- Loading branch information
1 parent
905122a
commit 44318da
Showing
5 changed files
with
137 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
# Karpenter | ||
|
||
Karpenter is an open-source Kubernetes cluster autoscaler built for efficiency and speed. This Helm chart installs Karpenter in your Kubernetes cluster and can be used to manage your node pools for dynamically scaling your infrastructure. This chart supports automated deployment of Karpenter, including the creation of NodePools, EC2NodeClasses, IAM roles, and other necessary resources. | ||
|
||
To install Karpenter, use the following commands: | ||
|
||
```shell | ||
$ helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/ | ||
$ helm install karpenter ot-helm/karpenter --namespace kube-system | ||
``` | ||
|
||
To upgrade the setup: | ||
|
||
```shell | ||
$ helm upgrade karpenter ot-helm/karpenter --install --namespace kube-system | ||
``` | ||
|
||
To uninstall the chart: | ||
|
||
```shell | ||
$ helm delete karpenter --namespace kube-system | ||
``` | ||
|
||
### Pre-Requisites | ||
|
||
- Kubernetes => 1.18+ | ||
- Helm => 3.X | ||
- Karpenter Operator => 0.1.0 | ||
- Open ID Connector (EKS) => https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html | ||
- IAM Roles for Karpenter | ||
- Add tags to subnets and security groups | ||
- Update aws-auth ConfigMap | ||
|
||
### Parameters | ||
|
||
| **Name** | **Value** | **Description** | | ||
|--------------------------------------------------------------------|:-------------------------------|------------------------------------------------| | ||
| `karpenter.settings.clusterName` | `my-cluster` | The name of your Kubernetes cluster | | ||
| `karpenter.serviceAccount.annotations.eks.amazonaws.com/role-arn` | Required | IAM role ARN for Karpenter controller | | ||
| `karpenter.controller.resources.requests.cpu` | `1` | CPU request for Karpenter controller | | ||
| `karpenter.controller.resources.requests.memory` | `1Gi` | Memory request for Karpenter controller | | ||
| `karpenter.controller.resources.limits.cpu` | `1` | CPU limit for Karpenter controller | | ||
| `karpenter.controller.resources.limits.memory` | `1Gi` | Memory limit for Karpenter controller | | ||
| `nodePools` | [] | List of NodePools to be created | | ||
| `nodePools.name` | default-nodepool | Name of the NodePool | | ||
| `nodePools.labels` - If not required can be omitted | {} | Labels for the NodePool | | ||
| `nodePools.annotations` - If not required can be omitted | {} | Annotations for the NodePool | | ||
| `nodePools.requirements` - Can be empty [] | [] | Node requirements like CPU, memory, etc. | | ||
| `nodePools.taints` - If not required can be omitted | [] | Taints for the NodePool | | ||
| `nodePools.expireAfter` | 720h | Expiration duration for idle NodePools | | ||
| `nodePools.limits.cpu` - Required Field | "1000m" | CPU limit for the NodePool | | ||
| `nodePools.limits.memory`- If not required can be omitted | "2Gi" | Memory limit for the NodePool | | ||
| `nodePools.disruption.consolidationPolicy` - Required Field | WhenEmptyOrUnderutilized | Consolidation policy for underutilized nodes | | ||
| `nodePools.disruption.consolidateAfter` - Required Field | 1m | Time before consolidating underutilized nodes | | ||
|
||
|
||
### Notes: | ||
|
||
- Refer to Example Folder for a example values.yaml file | ||
- Karpenter automatically creates and manages NodePools as part of the installation process. | ||
- Make sure to configure the IAM roles required by Karpenter for it to interact with EC2 instances and manage resources along with all prerequisites. | ||
- The chart will ensure the Karpenter controller and NodePools are deployed correctly with all required configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Custom values for chart | ||
clusterName: test-cluster | ||
awsPartition: aws | ||
awsAccountId: 384961113000 | ||
karpenterVersion: 1.1.1 | ||
|
||
# Karpenter chart overrides | ||
karpenter: | ||
settings: | ||
clusterName: test-cluster | ||
serviceAccount: | ||
annotations: | ||
eks.amazonaws.com/role-arn: arn:aws:iam::384961113000:role/KarpenterControllerRole-test-cluster | ||
controller: | ||
resources: | ||
requests: | ||
cpu: "1" | ||
memory: "1Gi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
|
||
nodePools: | ||
- name: default | ||
requirements: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- "amd64" | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: | ||
- "linux" | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: | ||
- "on-demand" | ||
- key: karpenter.k8s.aws/instance-category | ||
operator: In | ||
values: | ||
- "t" | ||
- "m" | ||
- "r" | ||
- key: karpenter.k8s.aws/instance-generation | ||
operator: Gt | ||
values: | ||
- "2" | ||
nodeClass: | ||
group: karpenter.k8s.aws | ||
kind: EC2NodeClass | ||
name: default # Name of the ec2nodeclass | ||
expireAfter: 720h | ||
limits: | ||
cpu: "1000" | ||
disruption: | ||
consolidationPolicy: WhenEmptyOrUnderutilized | ||
consolidateAfter: 1m | ||
annotations: | ||
example.com/owner: "my-team" | ||
example.com/maintainer: "[email protected]" | ||
# taints: | ||
# - key: "example.com/special-taint" | ||
# value: "special-value" | ||
# effect: "NoExecute" | ||
labels: | ||
environment: production | ||
team: "engineering" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters