1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

Updated the outdated example mentioned in Development.md file with latest one (#10706)

* Updated Expose the endpoint on a local port section in DEVELOPMENT.md file

Signed-off-by: Geetha Madhuri <geetha.bojanki@infosys.com>

* Updated the outdated example mentioned in Development.md file with latest one

Signed-off-by: Geetha Madhuri <geetha.bojanki@infosys.com>

---------

Signed-off-by: Geetha Madhuri <geetha.bojanki@infosys.com>
This commit is contained in:
Geetha Madhuri Bojanki 2024-07-24 12:48:39 +05:30 committed by GitHub
parent db45329cd6
commit f9a8388c14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -455,14 +455,27 @@ You can get at the application in the pod by port forwarding with kubectl, for e
````shell
$ kubectl -n kyverno get pod
NAME READY STATUS RESTARTS AGE
kyverno-7d67c967c6-slbpr 1/1 Running 0 19s
NAME READY STATUS RESTARTS AGE
kyverno-admission-controller-57df6c565f-pxpnh 1/1 Running 0 20s
kyverno-background-controller-766589695-dhj9m 1/1 Running 0 20s
kyverno-cleanup-controller-54466dfbc6-5mlrc 1/1 Running 0 19s
kyverno-cleanup-update-requests-28695530-ft975 1/1 Running 0 19s
kyverno-reports-controller-76c49549f4-tljwm 1/1 Running 0 20s
````
Check the port of the pod you'd like to forward using the command below.
````bash
$ kubectl -n kyverno port-forward kyverno-7d67c967c6-slbpr 6060
Forwarding from 127.0.0.1:6060 -> 6060
Forwarding from [::1]:6060 -> 6060
$ kubectl get pod kyverno-admission-controller-57df6c565f-pxpnh -n kyverno --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'
9443
````
Use the exposed port from above to run port-forward with the below command.
````bash
$ kubectl -n kyverno port-forward kyverno-admission-controller-57df6c565f-pxpnh 6060:9443
Forwarding from 127.0.0.1:6060 -> 9443
Forwarding from [::1]:6060 -> 9443
````
The HTTP endpoint will now be available as a local port.