apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-test-server
spec:
  replicas: 3
  selector:
    matchLabels:
      app: test-server
  template:
    metadata:
      labels:
        app: test-server
    spec:
      containers:
      - name: test-server
        image: registry.k8s.io/mysql-e2e-test:0.1
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 2
          periodSeconds: 2
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: tester-pdb
  labels:
    pdb: test-server
spec:
  minAvailable: 1
  selector:
    matchLabels:
      app: test-server
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: test-server
  name: test-server
spec:
  ports:
    - port: 8080
  selector:
    app: test-server
  type: LoadBalancer
