Skip to content

Instantly share code, notes, and snippets.

View josephrodriguez's full-sized avatar
🏠
Working from home

José Rodríguez josephrodriguez

🏠
Working from home
View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: pod-affinity-6
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
apiVersion: v1
kind: Pod
metadata:
name: pod-affinity-5
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
apiVersion: v1
kind: Pod
metadata:
name: pod-affinity-3
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
apiVersion: v1
kind: Pod
metadata:
name: pod-affinity-2
namespace: default
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
Name: pod-affinity-1
Namespace: default
Priority: 0
Service Account: default
Node: <none>
Labels: <none>
Annotations: <none>
Status: Pending
IP:
IPs: <none>
apiVersion: v1
kind: Pod
metadata:
name: pod-affinity-1
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: mysql-network-policy
labels:
app: mysql
spec:
podSelector:
matchLabels:
app: mysql
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
spec:
selector:
matchLabels:
app: mysql
serviceName: "mysql"
replicas: 3
apiVersion: v1
kind: Service
metadata:
labels:
app: mysql
name: mysql
spec:
clusterIP: None
ports:
- name: "3306"
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: mysql
spec:
maxUnavailable: 1
selector:
matchLabels:
app: mysql