commit
d43f09081e
3 changed files with 10 additions and 10 deletions
|
@ -38,9 +38,9 @@ See more details in the [ansible guide](ansible.md).
|
|||
Adding nodes
|
||||
------------
|
||||
|
||||
You may want to add **worker** nodes to your existing cluster. This can be done by re-running the `cluster.yml` playbook, or you can target the bare minimum needed to get kubelet installed on the worker and talking to your masters. This is especially helpful when doing something like autoscaling your clusters.
|
||||
You may want to add worker, master or etcd nodes to your existing cluster. This can be done by re-running the `cluster.yml` playbook, or you can target the bare minimum needed to get kubelet installed on the worker and talking to your masters. This is especially helpful when doing something like autoscaling your clusters.
|
||||
|
||||
- Add the new worker node to your inventory under kube-node (or utilize a [dynamic inventory](https://docs.ansible.com/ansible/intro_dynamic_inventory.html)).
|
||||
- Add the new worker node to your inventory in the appropriate group (or utilize a [dynamic inventory](https://docs.ansible.com/ansible/intro_dynamic_inventory.html)).
|
||||
- Run the ansible-playbook command, substituting `scale.yml` for `cluster.yml`:
|
||||
|
||||
ansible-playbook -i inventory/mycluster/hosts.ini scale.yml -b -v \
|
||||
|
|
|
@ -110,18 +110,18 @@ metadata:
|
|||
name: kube-registry-v0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-registry-upstream
|
||||
k8s-app: registry
|
||||
version: v0
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kube-registry-upstream
|
||||
k8s-app: registry
|
||||
version: v0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-registry-upstream
|
||||
k8s-app: registry
|
||||
version: v0
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
|
@ -164,12 +164,12 @@ metadata:
|
|||
name: kube-registry
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-registry-upstream
|
||||
k8s-app: registry
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeRegistry"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-registry-upstream
|
||||
k8s-app: registry
|
||||
ports:
|
||||
- name: registry
|
||||
port: 5000
|
||||
|
@ -257,7 +257,7 @@ You can use `kubectl` to set up a port-forward from your local node to a
|
|||
running Pod:
|
||||
|
||||
``` console
|
||||
$ POD=$(kubectl get pods --namespace kube-system -l k8s-app=kube-registry-upstream \
|
||||
$ POD=$(kubectl get pods --namespace kube-system -l k8s-app=registry \
|
||||
-o template --template '{{range .items}}{{.metadata.name}} {{.status.phase}}{{"\n"}}{{end}}' \
|
||||
| grep Running | head -1 | cut -f1 -d' ')
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
shell: >-
|
||||
{{ bin_dir }}/kubectl get configmap kube-proxy -n kube-system -o yaml
|
||||
| sed 's#server:.*#server:\ {{ kube_apiserver_endpoint }}#g'
|
||||
| kubectl replace -f -
|
||||
| {{ bin_dir }}/kubectl replace -f -
|
||||
delegate_to: "{{groups['kube-master']|first}}"
|
||||
run_once: true
|
||||
when: is_kube_master and kubeadm_discovery_address != kube_apiserver_endpoint
|
||||
|
@ -78,7 +78,7 @@
|
|||
# FIXME(mattymo): Reconcile kubelet kubeconfig filename for both deploy modes
|
||||
- name: Symlink kubelet kubeconfig for calico/canal
|
||||
file:
|
||||
src: "{{ kube_config_dir }}//kubelet.conf"
|
||||
src: "{{ kube_config_dir }}/kubelet.conf"
|
||||
dest: "{{ kube_config_dir }}/node-kubeconfig.yaml"
|
||||
state: link
|
||||
force: yes
|
||||
|
|
Loading…
Reference in a new issue