Skip to content

Instantly share code, notes, and snippets.

@viglesiasce
Last active October 24, 2018 23:28
Show Gist options
  • Save viglesiasce/824f51f79cc884a741e338b5e647fdb6 to your computer and use it in GitHub Desktop.
Save viglesiasce/824f51f79cc884a741e338b5e647fdb6 to your computer and use it in GitHub Desktop.
Example of using Taints and Node Selectors to test NAT GW setup
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: admin-pool
name: admin-pool
spec:
selector:
matchLabels:
run: admin-pool
template:
metadata:
labels:
run: admin-pool
spec:
containers:
- command:
- bash
- -c
- |
apt-get update && apt-get install curl -y
while [ 1 ];do
curl icanhazip.com
sleep 10
done
image: ubuntu:16.04
name: admin-pool
nodeSelector:
cloud.google.com/gke-nodepool: admin-pool
tolerations:
- effect: NoSchedule
key: admin-pool
operator: Equal
value: allowed
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: default-pool
name: default-pool
spec:
selector:
matchLabels:
run: default-pool
template:
metadata:
labels:
run: default-pool
spec:
containers:
- command:
- bash
- -c
- |
apt-get update && apt-get install curl -y
while [ 1 ];do
curl icanhazip.com
sleep 10
done
image: ubuntu:16.04
name: default-pool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment