Hi! Welcome to my first blog post, one of many more to come :)
I recently developed a Kubernetes operator for my secrets management project, FishyKeys. The objective was to generate Secrets objects from FishyKeys, taking inspiration from how External Secrets operates.
To accomplish this, I knew I needed to create an operator that will read my Custom Resource Definition (CRD) and generate the corresponding Secret object. Here is the structure of the CRD I had in mind:
1 | apiVersion: fishykeys.2v.pm/v1alpha1 |
The corresponding Secret would then be created:
1 | apiVersion: v1 |
There are quite a few libraries to interface with the Kubernetes API, but Operator SDK is the most reputable, and the one I decided to use.
Unfortunately I find their tutorial hard to follow for implementing the controller. They want you to fill in the blanks of an example code, and even though the code is quite documented, it’s too much clutter for my usecase and thus I preferred to build my controller’s logic incrementally.