“Nome de cubas jq json jq json” Respostas de código

Nome de cubas jq json jq json

# kubectl does not support regular expressions for JSONpath output
# The following command does not work
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'

# The following command achieves the desired result
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
DreamCoder

Nome de cubas jq json jq json

# kubectl does not support regular expressions for JSONpath output
# The following command does not work
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'

# The following command achieves the desired result
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
DreamCoder

Respostas semelhantes a “Nome de cubas jq json jq json”

Perguntas semelhantes a “Nome de cubas jq json jq json”

Mais respostas relacionadas para “Nome de cubas jq json jq json” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código