-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
86 additions
and
48 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 |
---|---|---|
@@ -1,10 +1,34 @@ | ||
[ | ||
{ | ||
"name" : "master_1", | ||
"name" : "master", | ||
"ip" : "192.168.42.100", | ||
"memory" : "2048", | ||
"playbook" : "master.playbook.yml", | ||
"master_ip" : "192.168.42.100", | ||
"master_port" : "8080" | ||
}, | ||
{ | ||
"name" : "node1", | ||
"ip" : "192.168.42.101", | ||
"memory" : "1024", | ||
"playbook" : "node.playbook.yml", | ||
"master_ip" : "192.168.42.100", | ||
"master_port" : "8080" | ||
}, | ||
{ | ||
"name" : "node2", | ||
"ip" : "192.168.42.102", | ||
"memory" : "1024", | ||
"playbook" : "node.playbook.yml", | ||
"master_ip" : "192.168.42.100", | ||
"master_port" : "8080" | ||
}, | ||
{ | ||
"name" : "node3", | ||
"ip" : "192.168.42.103", | ||
"memory" : "1024", | ||
"playbook" : "node.playbook.yml", | ||
"master_ip" : "192.168.42.100", | ||
"master_port" : "8080" | ||
} | ||
] |
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 |
---|---|---|
|
@@ -13,4 +13,5 @@ | |
- kubernetes | ||
- etcd | ||
- kubernetes_master | ||
- kubernetes_client | ||
- kubernetes_client | ||
- kubernetes_proxy |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
- name: Creating cluster info | ||
raw: "kubectl config set-cluster {{ master_name }} --server=http://{{ master_ip }}:{{ master_port }}" | ||
raw: "/kubernetes/server/bin/kubectl config set-cluster {{ master_name }} --server=http://{{ master_ip }}:{{ master_port }}" | ||
|
||
- name: Creating context | ||
raw: "kubectl config set-context {{ master_name }} --cluster={{ master_name }}" | ||
raw: "/kubernetes/server/bin/kubectl config set-context {{ master_name }} --cluster={{ master_name }}" | ||
|
||
- name: Setting context | ||
raw: "kubectl config use-context {{ master_name }}" | ||
raw: "/kubernetes/server/bin/kubectl config use-context {{ master_name }}" |
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 |
---|---|---|
|
@@ -33,4 +33,4 @@ | |
become: true | ||
systemd: | ||
name: kube-scheduler | ||
state: started | ||
state: started |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Creating kubelet file | ||
become: true | ||
template: | ||
src: roles/kubernetes_node/template/kubelet.service | ||
dest: /etc/systemd/system/kubelet.service | ||
|
||
- name: Launching kubelet | ||
become: true | ||
systemd: | ||
name: kubelet | ||
state: started |
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,12 @@ | ||
[Unit] | ||
Description=Kubernetes kubelet | ||
Documentation=https://github.com/kubernetes/kubernetes/tree/master/docs | ||
|
||
[Service] | ||
Slice=machine.slice | ||
ExecStart=/kubernetes/server/bin/kubelet \ | ||
--api-servers=http://{{ master_ip }}:{{ master_port }} \ | ||
--container-runtime=rkt | ||
ExecStopPost=pkill -TERM -f "kubelet" | ||
KillMode=process | ||
Restart=always |
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,12 @@ | ||
--- | ||
- name: Creating kube-proxy file | ||
become: true | ||
template: | ||
src: roles/kubernetes_proxy/template/kube-proxy.service | ||
dest: /etc/systemd/system/kube-proxy.service | ||
|
||
- name: Launching kube-proxy | ||
become: true | ||
systemd: | ||
name: kube-proxy | ||
state: started |
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,12 @@ | ||
[Unit] | ||
Description=Kubernetes proxy | ||
Documentation=https://github.com/kubernetes/kubernetes/tree/master/docs | ||
|
||
[Service] | ||
Slice=machine.slice | ||
ExecStart=/kubernetes/server/bin/kube-proxy \ | ||
--master {{ master_ip }}:{{ master_port }} | ||
ExecStopPost=pkill -TERM -f "kube-proxy" | ||
KillMode=process | ||
Restart=always | ||
Wants=kube-apiserver |