Proper use of quotes for running the command
$1 on a shell has a special meaning and inside of double quotes (") it will be expaned to an empty string. Using single quotes fixes the issue.
This commit is contained in:
parent
d3f9fbb8fb
commit
d8764de423
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ Rewriting can be controlled using the following annotations:
|
|||
Create an Ingress rule with a rewrite annotation:
|
||||
|
||||
```console
|
||||
$ echo "
|
||||
$ echo '
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
|
@ -50,7 +50,7 @@ spec:
|
|||
serviceName: http-svc
|
||||
servicePort: 80
|
||||
path: /something/?(.*)
|
||||
" | kubectl create -f -
|
||||
' | kubectl create -f -
|
||||
```
|
||||
|
||||
In this ingress definition, any characters captured by `(.*)` will be assigned to the placeholder `$1`, which is then used as a parameter in the `rewrite-target` annotation.
|
||||
|
|
Loading…
Reference in a new issue