RELEASE_VERSION=v0.8.0
curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk
rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
Check operator-sdk is installed :
operator-sdk version
Running initProject.sh
will setup the basics for the operator. This script
is just executing the following operator sdk command
operator-sdk init --plugins=helm --domain=helloservice--group=helloservice-demo --version=v1alpha1 --helm-chart ../charts/
Which creates a Helm-based operator based on the helm charts example. This will
put everything in values into the CRD. You can find an example in ./config/samples/
make docker-build docker-push IMG=ghcr.io/podtato-head/helloperator:latest
make install
make deploy IMG=ghcr.io/podtato-head/helloperator:latest
kubectl apply -f ./config/samples/helloservice-demo_v1alpha1_podtatoserver.yaml
kubectl delete -f ./config/samples/helloservice-demo_v1alpha1_podtatoserver.yaml
make undeploy