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:
|
Create an Ingress rule with a rewrite annotation:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ echo "
|
$ echo '
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -50,7 +50,7 @@ spec:
|
||||||
serviceName: http-svc
|
serviceName: http-svc
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
path: /something/?(.*)
|
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.
|
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