2021-03-12 19:36:17 +01:00
|
|
|
---
|
|
|
|
title: kubernetes single node cluster taint
|
2021-03-23 17:44:02 +01:00
|
|
|
date: 2020-12-06
|
2021-03-12 19:36:17 +01:00
|
|
|
description: How to schedule worker pods on your control plane node
|
|
|
|
tags:
|
2021-09-13 00:48:07 +02:00
|
|
|
- k3s
|
2021-03-12 19:36:17 +01:00
|
|
|
- kubernetes
|
|
|
|
---
|
|
|
|
|
|
|
|
## The solution
|
|
|
|
|
|
|
|
On a single node cluster, control plane nodes are tainted so that the cluster never schedules pods on them. To change that run :
|
2023-04-23 22:33:49 +02:00
|
|
|
```sh
|
2021-03-12 19:36:17 +01:00
|
|
|
kubectl taint nodes --all node-role.kubernetes.io/master-
|
2023-04-23 22:33:49 +02:00
|
|
|
```
|
2021-03-12 19:36:17 +01:00
|
|
|
|
|
|
|
Getting dns in your pods :
|
2023-04-23 22:33:49 +02:00
|
|
|
```sh
|
2021-03-12 19:36:17 +01:00
|
|
|
add --cluster-dns=10.96.0.10 to /etc/conf.d/kubelet
|
2023-04-23 22:33:49 +02:00
|
|
|
```
|