Open khalilbenaissa opened 6 years ago
Thanks for testing this! Yes, this should be possible, but is not recommended sine it can lead to data loss.
We have the minimal production setup preconfigured in the Ansible scripts (node_count: 3), but you can change the variables node_count
to 1
, public_node_code_count
to 0
and high_availability
to false
.
You need to do that in the file roles/package/kubernetes/tasks/kubernetes.yml
. This is what looks like for DC/OS Enterprise:
- name: ensure kubernetes is installed
dcos_package:
name: kubernetes
app_id: "{{ dcos_k8s_app_id }}"
version: "{{ dcos_k8s_package_version }}"
state: present
options:
service:
name: "{{ dcos_k8s_app_id }}"
service_account: "{{ dcos_k8s_app_id }}"
service_account_secret: "{{ dcos_k8s_app_id }}/secret"
kubernetes:
high_availability: false
node_count: 1
authorization_mode: "RBAC"
public_node_count: 0
when: dcos_deploy_ee_package
This is for DC/OS Open:
- name: ensure kubernetes is installed
dcos_package:
name: kubernetes
app_id: "{{ dcos_k8s_app_id }}"
version: "{{ dcos_k8s_package_version }}"
state: present
options:
service:
name: "{{ dcos_k8s_app_id }}"
kubernetes:
high_availability: false
node_count: 1
public_node_count: 0
when: not dcos_deploy_ee_package
For reference to expose the Kubectl Proxy, you also need 1 Public Agent. So if you don't have this it would break the auto-configuration of the kubectl
in the Ansible scripts. You also cannot decrease the node_count and high_avaliability settings when you already installed Kubernetes. You first need to uninstall Kubernetes and reinstall after with the new values.
I keep this ticket open as a feature request for making the config more accessible or at least to document what to adjust.
thank you, it works very well.
Hello, I want to ask you if i can change etc and apiserver to 1 container instead of 3 because i try to run kubernetes in a local cluster (one master, one agent) and i haven't a lot of resources.
Thank you.