I'm stuck for houres on this strange issue. I have a bashscript which is executing the following:
TEST="12.x.x.x"
echo ${TEST}
gave me 12.x.x.x
So now I want to use this env var in my command:
oadm ca create-server-cert --signer-cert=ca.crt \
--signer-key=ca.key --signer-serial=ca.serial.txt \
--hostnames='docker-registry.default.svc.cluster.local,$TEST' \
--cert=registry.crt --key=registry.key
An echo of this command shows the content of $TEST in it. But the command fails (it did not create the crt and key for my IP). But it works when I'm just executing:
oadm ca create-server-cert --signer-cert=ca.crt \
--signer-key=ca.key --signer-serial=ca.serial.txt \
--hostnames='docker-registry.default.svc.cluster.local,12.x.x.x' \
--cert=registry.crt --key=registry.key
What could be the issue? An echo of $TEST gave always my IP. Before and after the command.