Skip to content

development

Naka Masato edited this page Dec 27, 2021 · 5 revisions

Kubernetes Operator

Version: v1.15.0

Used commands:

  1. Initialize the project.

    operator-sdk init --domain nakamasato.com --repo github.com/nakamasato/mysql-operator
    
  2. Create API resources and their controllers.

    operator-sdk create api --group mysql --version v1alpha1 --kind MySQL --resource --controller
    operator-sdk create api --group mysql --version v1alpha1 --kind MySQLUser --resource --controller
    
  3. Create admission webhook.

    1. --defaulting (not used)
    2. --conversion
      operator-sdk create webhook --group mysql --version v1alpha1 --kind MySQL --conversion --programmatic-validation
      

Finalizers

Webhook

Testing

MySQL

Clone this wiki locally