Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #177 from cscetbon/tolerations
Browse files Browse the repository at this point in the history
Add documentation on how to add tolerations
  • Loading branch information
fdehay authored Jan 30, 2020
2 parents 7105714 + 018ad42 commit 4e9b189
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 10 additions & 8 deletions documentation/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ This Tells that we **Require** not deploy to a node if a pod already exists with
Cluster administrators can mark selected kubernetes nodes as tainted. Nodes with taints are excluded from regular
scheduling and normal pods will not be scheduled to run on them. Only services which can tolerate the taint set on the
node can be scheduled on it. The only other services running on such nodes will be kubernetes system services such as
log collectors or software defined networks
log collectors or software defined networks

Taints can be used to create dedicated nodes. Running Cassandra on dedicated nodes can have many advantages. There will
be no other applications running on the same nodes which could cause disturbance or consume the resources needed for
Expand All @@ -735,21 +735,23 @@ Additionally, add a label to the selected nodes as well
kubectl label node <your-node> dedicated=Cassandra
```

The `toleration` must be applied on the statefulset at the same level as `affinity`.
Pod tolerations like pod annotations can be added to created pods by using the pod entry in the spec section of the cassandracluster object as below :

```
kind: "CassandraCluster"
...
spec:
...
pod:
tolerations:
- key: "dedicated"
operator: "Equal"
value: "Cassandra"
effect: "NoSchedule"
- key: "dedicated"
operator: "Equal"
value: "Cassandra"
effect: "NoSchedule"
...
```

> **IMPORTANT:** toleration must be used with node affinity on the same labels
> TODO: actually the toleration is not implemented in CassKop
#### Configuring hard antiAffinity in Cassandra cluster

Expand Down
1 change: 0 additions & 1 deletion samples/kind/setup-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ NAMESPACE=${1:-cassandra-e2e}
$(dirname $0)/configure-local-storage.sh create
kubectl create namespace $NAMESPACE
kubens $NAMESPACE
helm init --service-account tiller
kubectl apply -f deploy/crds/db_v1alpha1_cassandracluster_crd.yaml

0 comments on commit 4e9b189

Please sign in to comment.