k8s

Kubernetes Concept 5

k8s sharing

Posted by frankie on July 14, 2019

Cluster scaling

Scaling a cluster from the GCP Console

A node pool, is a subset of node instance within a cluster. They all have the same configuration. Node pools use a NodeConfig specification.

Scaling a cluster using the gcloud command

gcloud container clusters resize projectdemo --node-pool default-pool --size 6

Scale up a cluster with autoscaling

Imgur

Imgur

Downscaling

Imgur

Imgur

Imgur

Imgur

Setting a node pool size

Imgur

Imgur

Controlling pod placement

Controlled scheduling

  • labels and taints on nodes
  • node affinity rules
  • toleration in deployment specification

Imgur

Imgur

Imgur

If the nodes labels are changed, running pods are not affected. Node selector is only used during pod scheduling.

Affinity and anti-affinity

Imgur

Imgur

Imgur

Imgur

Imgur

Pod placement

Imgur

Imgur

Taints allow a node to repel Pods

  • affinity and anti-affinity rules on Pods.
  • taints on nodes

Imgur

Imgur

Imgur

Imgur

Imgur

How to get software

  1. Build it yourself, and supply your own YAML

  2. Use Helm to install software into your cluster

Imgur

Imgur

  1. Use GCP Marketplace to install both open-source and commercial software