Skip to content

added information regarding K&s install customization #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions guide/installation/k8s_install/k8s_install_kubespray.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,27 @@ kube_node
calico_rr
```

## Step 3. Deploy Kubernetes
## Step 3. Define Kubernetes configuration

Kubespray gives you ability to customize Kubernetes instalation, for example define:
- network plugin
- container manager
- kube_apiserver_port
- kube_pods_subnet
- all K&s addons configurations, or even define to deploy cluster on hyperscaller like AWS or GCP.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not Kubernetes expertise, but the "K&s" looks like a typo for me here. you meant k8s? the line 93 and 95 have same issues here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkbhanda , what do you mean by DCO issue?
@ftian1 you are right , K&s seems like a typo.

Copy link
Collaborator

@mkbhanda mkbhanda Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCO -- https://github.com/apps/dco
Basically, in your comment messages need a -s with your email matching up with your github ID.
"git commit -a -s -m "something"
You could also configure this in your .gitconfig

Then when you do git log in a repo you get information about who made the commit. eg: Signed-off-by: letonghan letong.han@intel.com

All of those settings are stored in group vars defined in `inventory/mycluster/group_vars`

For K&s settings look in `inventory/mycluster/group_vars/k8s_cluster/k8s-cluster.yml`

**_NOTE:_** If you noted issues on `TASK [kubernetes/control-plane : Kubeadm | Initialize first master]` in K& deployment, change the port on which API Server will be listening on from 6443 to 8080. By default Kubespray configures kube_control_plane hosts with insecure access to kube-apiserver via port 8080. Refer to [kubespray getting-started](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/getting_started/getting-started.md)

```
# The port the API Server will be listening on.
kube_apiserver_ip: "{{ kube_service_addresses | ansible.utils.ipaddr('net') | ansible.utils.ipaddr(1) | ansible.utils.ipaddr('address') }}"
kube_apiserver_port: 8080 # (http)
```

## Step 4. Deploy Kubernetes

You can clean up old Kubernetes cluster with Ansible playbook with following command:
```
Expand All @@ -104,7 +124,7 @@ ansible-playbook -i inventory/mycluster/inventory.ini --become --become-user=ro

The Ansible playbooks will take several minutes to finish. After playbook is done, you can check the output. If `failed=0` exists, it means playbook execution is successfully done.

## Step 4. Create kubectl configuration
## Step 5. Create kubectl configuration

If you want to use Kubernetes command line tool `kubectl` on **k8s-master** node, please login to the node **k8s-master** and run the following commands:

Expand Down