This operator creates simple nginx pods corresponding to Spec and Updates status of Dummy object and logs certain provided message from the Spec.
Video Demonstration of this operator
- Clone this Repository.
- Run the operator using
make install run
. - Create the namespace to test out the operator.
kubectl create ns dummy-test
- Edit the sample config file by
vim config/samples/_v1alpha1_dummy.yaml
- For eg. set the following value:
apiVersion: souvikhaldar.in/v1alpha1
kind: Dummy
metadata:
name: dummy-sample
spec:
message: "I'm just a dummy"
replicaCount: 6
port: 80
- You can apply the config using:
kubectl apply -f config/samples/_v1alpha1_dummy.yaml -n dummy-test
- Now you can check if required number of pods are running or not as specified in the spec object by
kubectl get pods -n dummy-test
.
Alternatively, you can use the docker image https://hub.docker.com/r/souvikhaldar11/dummy-operator