Kubernetes Application Management: Stateful Services

Background

Use StatefulSets to Deploy MySQL

StatefulSet Overview

Service Deployment

ConfigMap

Headless Service

ClusterIP Service

StatefulSet

Service Maintenance

Service Fault Recovery

Service Scaling

Kubectl scale statefulset mysql -- replicas = <NumOfReplicas>

Service Status Monitoring

Data Backup and Recovery

Use Volume Interfaces

Use VolumeSnapshots

Deploy MySQL by Using Operators

Operator Introduction

Oracle MySQL Operator

How the Oracle MySQL Operator Works

Service Deployment

apiVersion: mysql.oracle.com/v1alpha1
kind: Cluster
metadata:
name: mysql-multimaster-cluster
spec:
multiMaster: true
members: 3

Service Maintenance

Service Fault Recovery

Service Scaling

Service Status Monitoring

Data Backup and Recovery

[...]
kind: BackupSchedule
spec:
schedule: '*/30 * * * *'
backupTemplate:
cluster:
name: mysql-cluster
executor:
provider: mysqldump
databases:
- test
[...]

Summary

References

Original Source

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store