Ariel Shaqed (Scolnicov)
01/17/2022, 7:01 AMkubectl patch ingress myingress --type json --patch-file=/tmp/patch.json
where /tmp/patch.json
is:
[
{
"op": "add",
"path": "/spec/rules/-",
"value": {
"host": "<http://another.example.com|another.example.com>",
"http": {
"paths": [
{
"backend": {
"service": {
"name": "another-svc",
"port": {
"number": 5678
}
}
},
"path": "/another",
"pathType": "Prefix"
}]
}
}
}
]
A (more) readable introduction to JSON Patch is http://jsonpatch.com/; there's also https://datatracker.ietf.org/doc/html/rfc6902 of course.Oz Katz
Ariel Shaqed (Scolnicov)
01/17/2022, 9:38 AM