-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into charliedmcb/useWorkloadIdForKarpenter
- Loading branch information
Showing
32 changed files
with
6,226 additions
and
4,725 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 |
---|---|---|
|
@@ -6,14 +6,39 @@ | |
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Azure/karpenter/issues) | ||
|
||
--- | ||
## Features Overview | ||
The AKS Karpenter Provider enables node autoprovisioning using [Karpenter](https://karpenter.sh/) on your AKS cluster. | ||
Karpenter improves the efficiency and cost of running workloads on Kubernetes clusters by: | ||
|
||
# AKS Karpenter Provider | ||
* **Watching** for pods that the Kubernetes scheduler has marked as unschedulable | ||
* **Evaluating** scheduling constraints (resource requests, node selectors, affinities, tolerations, and topology-spread constraints) requested by the pods | ||
* **Provisioning** nodes that meet the requirements of the pods | ||
* **Removing** the nodes when they are no longer needed | ||
* **Consolidating** existing nodes onto cheaper nodes with higher utilization per node | ||
|
||
The AKS Karpenter Provider enables node autoprovisioning using [Karpenter](https://karpenter.sh/) on your AKS cluster. | ||
## Production Readiness Status | ||
- API-Version: AKS Karpenter Provider is currently in alpha (`v1alpha2`). | ||
- AKS-Feature State: [Node Auto Provisioning is currently in preview](https://learn.microsoft.com/en-gb/azure/aks/node-autoprovision?tabs=azure-cli) | ||
|
||
## Status of Project: | ||
## Installation: Managed Karpenter (AKA Node Auto Provisioning) | ||
The Node Auto Provisioning Preview, runs Karpenter as a managed addon similar to Managed Cluster Autoscaler. | ||
|
||
To get started, just go through the prerequisites of [installing the Preview CLI](https://learn.microsoft.com/en-gb/azure/aks/node-autoprovision?tabs=azure-cli#install-the-aks-preview-cli-extension), and [register the NodeAutoProvisioningPreview feature flag](https://learn.microsoft.com/en-gb/azure/aks/node-autoprovision?tabs=azure-cli#register-the-nodeautoprovisioningpreview-feature-flag). | ||
|
||
### Enable node autoprovisioning | ||
To enable node autoprovisioning, create a new cluster using the `az aks create` command and set --node-provisioning-mode to "Auto". You'll also need to use overlay networking and the cilium network policy for now. | ||
|
||
```bash | ||
az aks create --name myFirstNap --resource-group napTest --node-provisioning-mode Auto --network-plugin azure --network-plugin-mode overlay --network-dataplane cilium | ||
``` | ||
|
||
The API for AKS Karpenter Provider is currently alpha (`v1alpha2`). | ||
[View Limitations of the node autoprovisioning preview here](https://learn.microsoft.com/en-gb/azure/aks/node-autoprovision?tabs=azure-cli#limitations) | ||
|
||
### NAP Usage | ||
- [Learn More about Configuring the Nodepool CRDs to be more or less flexible](https://learn.microsoft.com/en-gb/azure/aks/node-autoprovision?tabs=azure-cli#node-pools) | ||
|
||
## Helm Chart | ||
a self-hosted experience similar to [aws/karpenter](https://artifacthub.io/packages/helm/karpenter/karpenter) is coming soon... | ||
|
||
## Development | ||
|
||
|
@@ -59,14 +84,6 @@ A: Oftentimes, especially for pre-existing tests, running `make toolchain` will | |
|
||
--- | ||
|
||
Karpenter is an open-source node provisioning project built for Kubernetes. | ||
Karpenter improves the efficiency and cost of running workloads on Kubernetes clusters by: | ||
|
||
* **Watching** for pods that the Kubernetes scheduler has marked as unschedulable | ||
* **Evaluating** scheduling constraints (resource requests, nodeselectors, affinities, tolerations, and topology spread constraints) requested by the pods | ||
* **Provisioning** nodes that meet the requirements of the pods | ||
* **Removing** the nodes when the nodes are no longer needed | ||
|
||
### Source Attribution | ||
|
||
Notice: Files in this source code originated from a fork of https://github.com/aws/karpenter | ||
|
@@ -77,7 +94,7 @@ Many thanks to @ellistarn, @jonathan-innis, @tzneal, @bwagner5, @njtran, and man | |
Many thanks to @Bryce-Soghigian, @rakechill, @charliedmcb, @jackfrancis, @comtalyst, @aagusuab, @matthchr, @gandhipr, @dtzar for contributing to AKS Karpenter Provider! | ||
|
||
--- | ||
|
||
### Community, discussion, contribution, and support | ||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
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
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
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
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
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,71 @@ | ||
/* | ||
Portions Copyright (c) Microsoft Corporation. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package fake | ||
|
||
import ( | ||
"testing" | ||
|
||
"k8s.io/apimachinery/pkg/util/sets" | ||
) | ||
|
||
func TestSKUExistence(t *testing.T) { | ||
testSKUExistenceForRegion(t, "eastus", sets.New( | ||
"Standard_A0", | ||
"Standard_B1s", | ||
"Standard_D2s_v3", | ||
"Standard_D2_v2", | ||
"Standard_D2_v3", | ||
"Standard_D2_v5", | ||
"Standard_D4s_v3", | ||
"Standard_D64s_v3", | ||
"Standard_DC8s_v3", | ||
"Standard_DS2_v2", | ||
"Standard_F16s_v2", | ||
"Standard_M8-2ms", | ||
"Standard_NC24ads_A100_v4", | ||
"Standard_NC6s_v3", | ||
"Standard_NC16as_T4_v3", | ||
)) | ||
testSKUExistenceForRegion(t, "westcentralus", sets.New( | ||
"Standard_A0", | ||
"Standard_B1s", | ||
"Standard_D2s_v3", | ||
"Standard_D2_v2", | ||
"Standard_D2_v3", | ||
"Standard_D2_v5", | ||
"Standard_D4s_v3", | ||
"Standard_D64s_v3", | ||
"Standard_DS2_v2", | ||
"Standard_F16s_v2", | ||
)) | ||
} | ||
|
||
func testSKUExistenceForRegion(t *testing.T, region string, expectedSKUs sets.Set[string]) { | ||
generatedSKUs := ResourceSkus[region] | ||
|
||
skuSets := make(sets.Set[string]) | ||
for _, sku := range generatedSKUs { | ||
skuName := *sku.Name | ||
skuSets.Insert(skuName) | ||
} | ||
|
||
for _, expectedSKU := range expectedSKUs.UnsortedList() { | ||
if exists := skuSets.Has(expectedSKU); !exists { | ||
t.Errorf("SKU not found in %v: %v", region, expectedSKU) | ||
} | ||
} | ||
} |
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
Oops, something went wrong.