Skip to content

Commit 530bedb

Browse files
committed
Merge tag 'v0.9.4' into migration
2 parents f3389a6 + 5070934 commit 530bedb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1631
-716
lines changed

cmd/deploy_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
const ExampleAPIModel = `{
1616
"apiVersion": "vlabs",
1717
"properties": {
18-
"orchestratorProfile": { "orchestratorType": "Kubernetes", "kubernetesConfig": { "useManagedIdentity": %s, "etcdVersion" : "2.5.2" } },
18+
"orchestratorProfile": { "orchestratorType": "Kubernetes", "kubernetesConfig": { "useManagedIdentity": %s, "etcdVersion" : "2.2.5" } },
1919
"masterProfile": { "count": 1, "dnsPrefix": "", "vmSize": "Standard_D2_v2" },
2020
"agentPoolProfiles": [ { "name": "linuxpool1", "count": 2, "vmSize": "Standard_D2_v2", "availabilityProfile": "AvailabilitySet" } ],
2121
"windowsProfile": { "adminUsername": "azureuser", "adminPassword": "replacepassword1234$" },

cmd/scale.go

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error {
203203
currentNodeCount = len(indexes)
204204

205205
if currentNodeCount == sc.newDesiredAgentCount {
206+
log.Info("Cluster is currently at the desired agent count.")
206207
return nil
207208
}
208209
highestUsedIndex = indexes[len(indexes)-1]

docs/clusterdefinition.md

+87-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,93 @@ Here are the valid values for the orchestrator types:
4141
|maxPods|no|The maximum number of pods per node. The minimum valid value, necessary for running kube-system pods, is 5. Default value is 30 when networkPolicy equals azure, 110 otherwise.|
4242
|gcHighThreshold|no|Sets the --image-gc-high-threshold value on the kublet configuration. Default is 85. [See kubelet Garbage Collection](https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/) |
4343
|gcLowThreshold|no|Sets the --image-gc-low-threshold value on the kublet configuration. Default is 80. [See kubelet Garbage Collection](https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/) |
44-
|disabledAddons.dashboard|no|Disable dashboard addon (boolean - default == false, i.e. not disabled)|
44+
|useInstanceMetadata|no|Use the Azure cloudprovider instance metadata service for appropriate resource discovery operations. Default is `true`.|
45+
|addons|no|Configure various Kubernetes addons configuration (currently supported: tiller, kubernetes-dashboard). See `addons` configuration below.|
46+
47+
`addons` describes various addons configuration. It is a child property of `kubernetesConfig`. Below is a list of currently available addons:
48+
49+
|Name of addon|Enabled by default?|How many containers|Description|
50+
|tiller|true|Delivers the Helm server-side component: tiller. See https://github.com/kubernetes/helm for more info.|
51+
|kubernetes-dashboard|true|1|Delivers the kubernetes dashboard component. See https://github.com/kubernetes/dashboard for more info.|
52+
53+
To give a bit more info on the `addons` property: We've tried to expose the basic bits of data that allow useful configuration of these cluster features. Here are some example usage patterns that will unpack what `addons` provide:
54+
55+
To enable an addon (using "tiller" as an example):
56+
57+
```
58+
"kubernetesConfig": {
59+
"addons": [
60+
{
61+
"name": "tiller",
62+
"enabled" : true
63+
}
64+
]
65+
}
66+
```
67+
68+
As you can see above, `addons` is an array child property of `kubernetesConfig`. Each addon that you want to add custom configuration to would be represented as an object item in the array. For example, to disable both tiller and dashboard:
69+
70+
```
71+
"kubernetesConfig": {
72+
"addons": [
73+
{
74+
"name": "tiller",
75+
"enabled" : false
76+
},
77+
{
78+
"name": "dashboard",
79+
"enabled" : false
80+
}
81+
]
82+
}
83+
```
84+
85+
More usefully, let's add some custom configuration to both of the above addons:
86+
87+
```
88+
"kubernetesConfig": {
89+
"addons": [
90+
{
91+
"name": "tiller",
92+
"containers": [
93+
{
94+
"name": "tiller",
95+
"image": "myDockerHubUser/tiller:v3.0.0-alpha
96+
"cpuRequests": "1",
97+
"memoryRequests": "1024Mi",
98+
"cpuLimits": "1",
99+
"memoryLimits": "1024Mi"
100+
}
101+
]
102+
},
103+
{
104+
"name": "kubernetes-dashboard",
105+
"containers": [
106+
{
107+
"name": "kubernetes-dashboard",
108+
"cpuRequests": "50m",
109+
"memoryRequests": "512Mi",
110+
"cpuLimits": "50m",
111+
"memoryLimits": "512Mi"
112+
}
113+
]
114+
}
115+
]
116+
}
117+
```
118+
119+
Above you see custom configuration for both tiller and kubernetes-dashboard. Both include specific resource limit values across the following dimensions:
120+
121+
- cpuRequests
122+
- memoryRequests
123+
- cpuLimits
124+
- memoryLimits
125+
126+
See https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ for more on Kubernetes resource limits.
127+
128+
Additionally above, we specified a custom docker image for tiller, let's say we want to build a cluster and test an alpha version of tiller in it.
129+
130+
Finally, the `addons.enabled` boolean property was omitted above; that's by design. If you specify a `containers` configuration, acs-engine assumes you're enabling the addon. The very first example above demonstrates a simple "enable this addon with default configuration" declaration.
45131

46132
### masterProfile
47133
`masterProfile` describes the settings for master configuration.

docs/images/rdptunnels.png

7.68 KB
Loading

docs/kubernetes/monitoring.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,14 @@ Another option to see stats is via Grafana and Influx DB. Grafana is a powerful
7373

7474
To set up Grafana, we will need to deploy Grafana and InfluxDB. We will also need to configure Heapster to use InfluxDB as its storage backend.
7575

76-
1. `git clone https://github.com/kubernetes/Heapster.git $HOME/heapster`
77-
1. `cd $HOME/heapster`
78-
1. `git checkout release-1.4`
79-
1. `git cherry-pick c674a16f74782b326f02345486b5f9520891f395` (This works around the [open issue](https://github.com/kubernetes/Heapster/issues/1783) with Grafana deployments currently)
80-
1. `kubectl create -f deploy/kube-config/influxdb/influxdb.yaml`
81-
1. `kubectl create -f deploy/kube-config/influxdb/grafana.yaml`
76+
1. `wget https://raw.githubusercontent.com/kubernetes/heapster/release-1.5/deploy/kube-config/influxdb/influxdb.yaml`
77+
1. `wget https://raw.githubusercontent.com/kubernetes/heapster/release-1.5/deploy/kube-config/influxdb/grafana.yaml`
78+
1. `kubectl create -f influxdb.yaml`
79+
1. `kubectl create -f grafana.yaml`
8280
1. `kubectl get pods --namespace=kube-system` Ensure that Heapster, Grafana and InfluxDB are in the `Running` state
8381
1. `kubectl edit deployment/heapster --namespace=kube-system`
84-
1. We need to configure Heapster to use InfluxDB as the the data store. To do that under the spec > containers > command property change the command field from:
82+
83+
We need to configure Heapster to use InfluxDB as the the data store. To do that under the spec > containers > command property change the command field from:
8584
``` yaml
8685
- command:
8786
- /heapster

docs/kubernetes/windows.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Once your Kubernetes cluster has been created you will have a resource group con
4646

4747
1. 1 master accessible by SSH on port 22 or kubectl on port 443
4848

49-
2. a set of windows and linux nodes. The windows nodes can be accessed through an RDP SSH tunnel via the master node. To do this, follow these [instructions](../ssh.md#create-port-80-tunnel-to-the-master), replacing port 80 with 3389. Since your windows machine is already using port 3389, it is recommended to use 3390 to Windows Node 0, 10.240.245.5, 3391 to Windows Node 1, 10.240.245.6, and so on as shown in the following image:
49+
2. a set of windows and linux nodes. The windows nodes can be accessed through an RDP SSH tunnel via the master node. To do this, follow these [instructions](../ssh.md#ssh-to-the-machine), replacing port 80 with 3389. Since your windows machine is already using port 3389, it is recommended to use 3390 to Windows Node 0, 10.240.0.4, 3391 to Windows Node 1, 10.240.0.5, and so on as shown in the following image:
5050

5151
![Image of Windows RDP tunnels](../images/rdptunnels.png)
5252

docs/ssh.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ Pageant enables agent forwarding. This means that you can SSH from any of the m
3838

3939
The DC/OS admin router requires an SSH tunnel from port 80 to port 80.
4040

41-
1. Verify you have nothing listening on port 80:
41+
### Verify you have nothing listening on port 80:
4242
1. on linux or Mac type `sudo netstat -anpe | grep ":80"` and stop any service or process listening on port 80
4343
2. on windows, at the command prompt type `netstat -ano | findstr /c:":80"` and stop any service or process listening on port 80.
4444

45-
2. Get the "sshMaster0" command:
45+
### Get the "sshMaster0" command:
4646
1. If using Powershell or CLI, the output parameters are the last values printed
4747
2. If using Portal, to get the output you need to:
48-
1. navigate to "resource group"
49-
2. click on the resource group you just created
50-
3. then click on "Succeeded" under *last deployment*
51-
4. then click on the "Microsoft.Template"
52-
5. now you can copy the output of "sshMaster0"
48+
1. navigate to "resource group"
49+
2. click on the resource group you just created
50+
3. then click on "Succeeded" under *last deployment*
51+
4. then click on the "Microsoft.Template"
52+
5. now you can copy the output of "sshMaster0"
5353
![Image of docker scaling](images/findingoutputs.png)
5454

55-
2. SSH to the machine
55+
### SSH to the machine
5656
1. on linux or Mac, modify the ssh command from "sshMaster0", and add `-L 80:localhost:80`, then use that command to connect
5757
2. on Windows, open Putty and in addition to the instructions from [agent forwarding](#key-management-and-agent-forwarding-with-windows-pageant), browse to Connection->SSH->Tunnel and add "80" to Source Port and "localhost:80" to Destination.
5858
![Image of putty port 80](images/putty-port80tunnel.png)

examples/e2e-tests/kubernetes/release/default/definition.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"orchestratorProfile": {
55
"orchestratorType": "Kubernetes",
66
"kubernetesConfig": {
7+
"enableRbac": true,
78
"networkPolicy": "calico",
89
"clusterSubnet": "10.230.0.0/16"
910
}

examples/kubernetes-config/kubernetes-no-dashboard.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
"orchestratorProfile": {
55
"orchestratorType": "Kubernetes",
66
"kubernetesConfig": {
7-
"disabledAddons": {
8-
"dashboard": true
9-
}
7+
"addons": [
8+
{
9+
"name": "dashboard",
10+
"enabled" : false
11+
}
12+
]
1013
}
1114
},
1215
"masterProfile": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"apiVersion": "vlabs",
3+
"properties": {
4+
"orchestratorProfile": {
5+
"orchestratorType": "Kubernetes",
6+
"kubernetesConfig": {
7+
"networkPolicy": "azure"
8+
}
9+
},
10+
"masterProfile": {
11+
"count": 1,
12+
"dnsPrefix": "",
13+
"vmSize": "Standard_D2_v2"
14+
},
15+
"agentPoolProfiles": [
16+
{
17+
"name": "agentpool1",
18+
"count": 3,
19+
"vmSize": "Standard_D2_v2",
20+
"availabilityProfile": "AvailabilitySet"
21+
},
22+
{
23+
"name": "agentpool2",
24+
"count": 3,
25+
"vmSize": "Standard_D2_v2",
26+
"availabilityProfile": "AvailabilitySet"
27+
}
28+
],
29+
"linuxProfile": {
30+
"adminUsername": "azureuser",
31+
"ssh": {
32+
"publicKeys": [
33+
{
34+
"keyData": ""
35+
}
36+
]
37+
}
38+
},
39+
"servicePrincipalProfile": {
40+
"clientId": "",
41+
"secret": ""
42+
}
43+
}
44+
}

parts/kubernetesagentcustomdata.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ write_files:
3636
content: |
3737
{{WrapAsVariable "caCertificate"}}
3838
39-
- path: "/etc/kubernetes/certs/apiserver.crt"
40-
permissions: "0644"
41-
encoding: "base64"
42-
owner: "root"
43-
content: |
44-
{{WrapAsVariable "apiserverCertificate"}}
45-
4639
- path: "/etc/kubernetes/certs/client.crt"
4740
permissions: "0644"
4841
encoding: "base64"
@@ -108,7 +101,7 @@ write_files:
108101
DOCKER_OPTS=
109102
CUSTOM_CMD=/bin/true
110103
KUBELET_REGISTER_SCHEDULABLE=true
111-
KUBELET_NODE_LABELS={{ GetKubernetesLabels . }}
104+
KUBELET_NODE_LABELS={{GetAgentKubernetesLabels . "',variables('labelResourceGroup'),'"}}
112105
KUBELET_POD_INFRA_CONTAINER_IMAGE={{WrapAsVariable "kubernetesPodInfraContainerSpec"}}
113106
KUBELET_NODE_STATUS_UPDATE_FREQUENCY={{WrapAsVariable "kubernetesNodeStatusUpdateFrequency"}}
114107
KUBE_CTRL_MGR_NODE_MONITOR_GRACE_PERIOD={{WrapAsVariable "kubernetesCtrlMgrNodeMonitorGracePeriod"}}

parts/kubernetesmasteraddons-kubernetes-dashboard-deployment.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ spec:
7575
ports:
7676
- containerPort: 9090
7777
protocol: TCP
78+
resources:
79+
requests:
80+
cpu: <kubernetesDashboardCPURequests>
81+
memory: <kubernetesDashboardMemoryRequests>
82+
limits:
83+
cpu: <kubernetesDashboardCPULimit>
84+
memory: <kubernetesDashboardMemoryLimit>
7885
serviceAccountName: kubernetes-dashboard
7986
nodeSelector:
8087
beta.kubernetes.io/os: linux

parts/kubernetesmasteraddons-kubernetes-dashboard-deployment1.5.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ spec:
7474
ports:
7575
- containerPort: 9090
7676
protocol: TCP
77+
resources:
78+
requests:
79+
cpu: <kubernetesDashboardCPURequests>
80+
memory: <kubernetesDashboardMemoryRequests>
81+
limits:
82+
cpu: <kubernetesDashboardCPULimit>
83+
memory: <kubernetesDashboardMemoryLimit>
7784
serviceAccountName: kubernetes-dashboard
7885
nodeSelector:
7986
beta.kubernetes.io/os: linux

0 commit comments

Comments
 (0)