I'm trying to run an Apache Pulsar container as part of a Kubernetes deployment. I need to change the port of Apache Pulsar. The entry for Pulsar in my Kubernetes yaml looks like this
- name: pulsar
image: apachepulsar/pulsar:3.1.2
args: ["sed", "-i", "'s/webServicePort=8080/webServicePort=8082/g'", "conf/standalone.conf", ";", "bin/pulsar", "standalone"]
I ran play kube and got the following error:
sed: -e expression #1, char 1: unknown command: `''
I believe this is due to the extra single quotes around the
sedexpression.Try doing this to fix it:
Replace your
argsline with:This correction uses
sh -cto execute a shell command and correctly formats thesedcommand without extra quotes. The&&is used to runbin/pulsar standaloneafter thesedcommand successfully executes.