Advanced
Kubernetes Operator Development
Design and implement a custom Kubernetes operator using the Operator SDK to manage a complex stateful application.
📝 プロンプトの内容
Act as a Platform Engineer. Design a Kubernetes Custom Resource Definition (CRD) for a distributed database cluster that requires leader election and sharding. Using the Kubebuilder framework concepts, outline the structure of the Reconcile loop. Specifically, explain how you would handle the scenario where the primary node fails and the operator must promote a replica. Discuss the use of Finalizers to ensure clean resource deletion and how you would implement status subresources to report the health of the cluster to the user.