Veena:
Hi, when we pass an yaml input, the kube-apiserver converts it into json object internally, is there a way to get that json object ?
Pankaj Arora:
Kubectl get pod -o json
Pankaj Arora:
Same will work for any object
Veena:
not the resource json, I want apiserver json object
Veena:
{
"uid": "1299d386-525b-4032-98ae-1949f69f9cfc",
"kind": {
"group": "<http://networking.k8s.io|networking.k8s.io>",
"kind": "Ingress",
"version": "v1"
},
"object": {
"apiVersion": "<http://networking.k8s.io/v1|networking.k8s.io/v1>",
"kind": "Ingress",
"metadata": {
"name": "tls-example-ingress",
"namespace": "some-namespace",
"labels": {
"cc-center": "123",
"owner": "team-alpha"
}
},
"spec": {
"tls": [
{
"hosts": [
"<http://https-example.foo.com|https-example.foo.com>"
],
"secretName": "testsecret-tls"
}
],
"rules": [
{
"host": "<http://https-example.foo.com|https-example.foo.com>",
"http": {
"paths": [
{
"path": "/",
"pathType": "Prefix",
"backend": {
"service": {
"name": "service1",
"port": {
"number": 80
}
}
}
}
]
}
}
]
}
}
}
Veena:
something of this sort