Skip to content

Commit

Permalink
Merge branch 'master' into issue/131
Browse files Browse the repository at this point in the history
# Conflicts:
#	cluster-autoscaler/cloudprovider/aws/ec2_instance_types.go
  • Loading branch information
mrcrgl committed Nov 23, 2017
2 parents 8a923bc + 64badc9 commit c214eae
Show file tree
Hide file tree
Showing 96 changed files with 18,400 additions and 3,112 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository contains autoscaling-related components for Kubernetes.
## What's inside

[Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) - a component that automatically adjusts the size of a Kubernetes
Cluster so that all pods have a place to run and there are no unneeded nodes. Works with GCP and AWS. Version 1.0 (GA) released with kubernetes 1.8.
Cluster so that all pods have a place to run and there are no unneeded nodes. Works with GCP, AWS and Azure. Version 1.0 (GA) was released with kubernetes 1.8.

[Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler) - a set of components that automatically adjust the
amount of CPU and memory requested by pods running in the Kubernetes Cluster. Current state - under development.
Expand Down
537 changes: 294 additions & 243 deletions cluster-autoscaler/FAQ.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions cluster-autoscaler/Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cluster-autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ifndef REGISTRY
$(ERR)
endif
docker build --pull -t ${REGISTRY}/cluster-autoscaler:${TAG} .
gcloud docker -- push ${REGISTRY}/cluster-autoscaler:${TAG}
./push_image.sh ${REGISTRY}/cluster-autoscaler:${TAG}

clean:
rm -f cluster-autoscaler
Expand Down
7 changes: 7 additions & 0 deletions cluster-autoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ there is a big chance that it won't work as expected.

# Notable changes

CA version 1.0.3:
* Adds support for safe-to-evict annotation on pod. Pods with this annotation
can be evicted even if they don't meet other requirements for it.
* Fixes an issue when too many nodes with GPUs could be added during scale-up
(https://github.com/kubernetes/kubernetes/issues/54959).

CA Version 1.0.2:
* Fixes issues with scaling node groups using GPU from 0 to 1 on GKE (https://github.com/kubernetes/autoscaler/pull/401) and AWS (https://github.com/kubernetes/autoscaler/issues/321).
* Fixes a bug where goroutines performing API calls were leaking when using dynamic config on AWS (https://github.com/kubernetes/autoscaler/issues/252).
Expand Down Expand Up @@ -106,3 +112,4 @@ Right now it is possible to run Cluster Autoscaler on:
* GCE https://kubernetes.io/docs/concepts/cluster-administration/cluster-management/
* GKE https://cloud.google.com/container-engine/docs/cluster-autoscaler
* AWS https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md
* Azure https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/azure/README.md
202 changes: 202 additions & 0 deletions cluster-autoscaler/cloudprovider/azure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# Cluster Autoscaler on Azure

The cluster autoscaler on Azure scales worker nodes within any specified autoscaling group. It will run as a `Deployment` in your cluster. This README will go over some of the necessary steps required to get the cluster autoscaler up and running.

## Kubernetes Version

Cluster autoscaler must run on Kubernetes with Azure VMSS support ([kubernetes#43287](https://github.com/kubernetes/kubernetes/issues/43287)). It is planed in Kubernetes v1.10.

## Permissions

Get azure credentials by running the following command

```sh
# replace <subscription-id> with yours.
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<subscription-id>" --output json
```

And fill the values with the result you got into the configmap

```yaml
apiVersion: v1
data:
ClientID: <client-id>
ClientSecret: <client-secret>
ResourceGroup: <resource-group>
SubscriptionID: <subscription-id>
TenantID: <tenand-id>
ScaleSetName: <scale-set-name>
kind: ConfigMap
metadata:
name: cluster-autoscaler-azure
namespace: kube-system
```
Create the configmap by running
```sh
kubectl create -f cluster-autoscaler-azure-configmap.yaml
```

## Deployment

```yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cluster-autoscaler
namespace: kube-system
labels:
app: cluster-autoscaler
spec:
replicas: 1
selector:
matchLabels:
app: cluster-autoscaler
template:
metadata:
labels:
app: cluster-autoscaler
spec:
containers:
- image: feisky/cluster-autoscaler:dev
name: cluster-autoscaler
resources:
limits:
cpu: 100m
memory: 300Mi
requests:
cpu: 100m
memory: 300Mi
env:
- name: ARM_SUBSCRIPTION_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: SubscriptionID
- name: ARM_RESOURCE_GROUP
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ResourceGroup
- name: ARM_TENANT_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: TenantID
- name: ARM_CLIENT_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ClientID
- name: ARM_CLIENT_SECRET
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ClientSecret
- name: ARM_SCALE_SET_NAME
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ScaleSetName
command:
- ./cluster-autoscaler
- --v=4
- --cloud-provider=azure
- --skip-nodes-with-local-storage=false
- --nodes="1:10:$(ARM_SCALE_SET_NAME)"
volumeMounts:
- name: ssl-certs
mountPath: /etc/ssl/certs/ca-certificates.crt
readOnly: true
imagePullPolicy: "Always"
volumes:
- name: ssl-certs
hostPath:
path: "/etc/ssl/certs/ca-certificates.crt"
```
## Deploy in master node
To run a CA pod in master node - CA deployment should tolerate the master `taint` and `nodeSelector` should be used to schedule the pods in master node.

```yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cluster-autoscaler
namespace: kube-system
labels:
app: cluster-autoscaler
spec:
replicas: 1
selector:
matchLabels:
app: cluster-autoscaler
template:
metadata:
labels:
app: cluster-autoscaler
spec:
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
nodeSelector:
kubernetes.io/role: master
containers:
- image: feisky/cluster-autoscaler:dev
name: cluster-autoscaler
resources:
limits:
cpu: 100m
memory: 300Mi
requests:
cpu: 100m
memory: 300Mi
env:
- name: ARM_SUBSCRIPTION_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: SubscriptionID
- name: ARM_RESOURCE_GROUP
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ResourceGroup
- name: ARM_TENANT_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: TenantID
- name: ARM_CLIENT_ID
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ClientID
- name: ARM_CLIENT_SECRET
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ClientSecret
- name: ARM_SCALE_SET_NAME
valueFrom:
configMapKeyRef:
name: cluster-autoscaler-azure
key: ScaleSetName
command:
- ./cluster-autoscaler
- --v=4
- --cloud-provider=azure
- --skip-nodes-with-local-storage=false
- --nodes="1:10:$(ARM_SCALE_SET_NAME)"
volumeMounts:
- name: ssl-certs
mountPath: /etc/ssl/certs/ca-certificates.crt
readOnly: true
imagePullPolicy: "Always"
volumes:
- name: ssl-certs
hostPath:
path: "/etc/ssl/certs/ca-certificates.crt"
```
Loading

0 comments on commit c214eae

Please sign in to comment.