-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathkubectl-mlb.yml
71 lines (66 loc) · 1.99 KB
/
kubectl-mlb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
- name: Install Kubectl Proxy via Marathon-LB
hosts: localhost
serial: 1
become: false
tasks:
- name: Connect to the cluster
include: connection.yml
- name: Create a group for Marathon-LB
dcos_iam_group:
gid: marathon-lb-group
description: Permissions for Marathon-LB
state: present
permissions:
- rid: dcos:service:marathon:marathon:services:/
action: read
- rid: dcos:service:marathon:marathon:admin:events
action: read
- name: Create service account for Marathon-LB
dcos_iam_serviceaccount:
sid: marathon-lb
description: 'Marathon-lb Service Account'
secret_path: marathon-lb/secret
groups:
- marathon-lb-group
state: present
- name: Ensure Marathon-LB is installed
dcos_package:
name: marathon-lb
app_id: marathon-lb
version: 1.12.2
state: present
options:
marathon-lb:
secret_name: "marathon-lb/secret"
marathon-uri: "https://marathon.mesos:8443"
bind-http-https: false
instances: 1
- name: Deploy Kubectl Proxy via Marathon
dcos_marathon:
app_id: /kubectl-proxy
state: present
options:
{
"id": "/kubectl-proxy",
"instances": 1,
"cpus": 0.001,
"mem": 16,
"cmd": "tail -F /dev/null",
"container": {
"type": "MESOS"
},
"portDefinitions": [
{
"protocol": "tcp",
"port": 0
}
],
"labels": {
"HAPROXY_GROUP": "external",
"HAPROXY_0_MODE": "http",
"HAPROXY_0_PORT": "8181",
"HAPROXY_0_SSL_CERT": "/etc/ssl/cert.pem",
"HAPROXY_0_BACKEND_SERVER_OPTIONS": " timeout connect 10s\n timeout client 86400s\n timeout server 86400s\n timeout tunnel 86400s\n server kube-apiserver apiserver.kubernetes.l4lb.thisdcos.directory:6443 ssl verify none\n"
}
}