ahmetb / kubernetes-network-policy-recipes

Example recipes for Kubernetes Network Policies that you can just copy paste
Apache License 2.0
5.69k stars 1.73k forks source link

Updated kubectl run command as per v1.18 #58

Closed Tej-Singh-Rana closed 3 years ago

Tej-Singh-Rana commented 4 years ago

In section 09-allow-traffic-only-to-a-port, you wrote "Run a web server deployment called apiserver: " but In kubectl run command, used --generator=run-pod/v1 and it's create Pod. So i haven't changed that may be it's sound okay.

regards,

Tej-Singh-Rana commented 4 years ago

Minor indentation error fixed.

boredabdel commented 3 years ago

Hi,

I reviewed the PR and i have few remarks.

You initial comment is about 09-allow-traffic-only-to-a-port.md where the description (deployment) doesn't match the kubectl command (pod). I'm happy to change either.

But the PR is proposing to change all the files now to the kubect run command, which prior to 1.18 would create a deployment and not a pod.

kubectl run --generator=run-pod/v1 creates a pod and works in 1.18 and also in old versions of kubectl (tested with 1.17)

I'm going to close this one. Please open a new PR to fix the syntax in 09-allow-traffic-only-to-a-port.md. Essentially change deployment to pod.

Cheers