I have a k8s manifest file for loadbalancer below and cannot for the life of me get the $ipaddress be replaced with value, I have got to to overwrite whole file or part of or even just leave blank. How can I replace only the $ipaddress like in below
Tried as example 2 below:
yq e '.spec|=select(.loadBalancerIP) .ports.port = "172.16.87.98"' manifest.yaml yq e -i '(.spec|=select(.loadBalancerIP.$ipaddress) = "172.16.87.98"' manifest.yaml
apiVersion: v1
kind: Service
metadata:
name: my-lb-cluster
spec:
loadBalancerIP: $ipaddress
ports:
- name: ssl
port: 8080
selector:
role: webserver
sessionAffinity: None
type: LoadBalancer
jq
tag? – Chaplain