Running the Operator SDK locally with an Ansible operator
source link: https://notes.elmiko.dev/2019/07/03/running-opeartor-sdk.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Running the Operator SDK locally with an Ansible operator
03 Jul 2019
The Operator SDK project is a really cool framework to help you build Kubernetes operators. I’ve been really intrigued about the Ansible style operators as they seem to offer a great deal of convenience.
When developing and debugging operators it is really useful to be able to run them locally without needing to install an image in a registry somewhere. I’ve been trying to get an ansible based operator working with the operator-sdk in local mode and struggling with the upstream instructions.
This is what finally worked for me in Fedora 30 after:
- make sure ansible is installed
- install the following packages through
dnf
python3-ansible-runner python3-psutil python3-openshift
- install the http runner for ansible with the following command:
pip3 install --user ansible-runner-http
- make a symbolic link for
/usr/bin/python
to/usr/bin/python3
. i still don’t understand this one, but for some reason when i run the ansible operator it tries to run python2 even though it knows where the python3 binary is located. - you will most likely need to have a
cluster-admin
role if you are running on OpenShift
After all this I was able to run operator-sdk up local
and my operator was
running fine. Now on to the debugging ;)
Update 31 July 2019
One more thing to keep in mind when you are running local operators. The
watches.yaml
file will be set to look for things in /opt/ansible/
, so I
needed to make a symlink from /opt/ansible
to the root of my project
directory. You could also just change the watches file.
Recommend
-
61
thoughts
-
5
Running Liberty Applications with Db2 locally IBM provides a nice workshop that demonstrates how to modernize legacy WebSpher...
-
10
Running legacy Java Applications locally I’ve been working on app modernization recently and had to get some older Java EE applications to work. In order to do this, I’ve used containers which was much faster than co...
-
16
What I Learned Running A Honeypot - 2 - Failing to Run it Locally Posted Sep 42020-09-04T01:20:00-05:00 by remotephone I’m not made of moneyThis honeypot had been running in AWS for a few...
-
5
In this post I want to show how you can use the cross-platform Azurite Azure Storage emulator running as a Docker container to develop Durable Functi...
-
7
-
41
VQGAN-CLIP Overview A repo for running VQGAN+CLIP locally. This started out as a Katherine Crowson VQGAN+CLIP derived Google colab notebook. Original notebook: Some example images: Environment: Teste...
-
2
Options for running locally with DaprThis website uses cookies to ensure you get the best experience on our website. Learn more
-
7
Testing Percona Distribution for MySQL Operator Locally with Kind Back to the Blog
-
6
React app running locally failing with opensslErrorStack ERR_OSSL_EVP_UNSUPPORTED I just started getting this error starting up my React app locally with ‘npm run start’ : opensslErrorStac...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK