Created
August 29, 2019 02:41
-
-
Save TheNotary/011e9723b04231f84175fc8dd114ef57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: NetworkPolicy | |
apiVersion: networking.k8s.io/v1 | |
metadata: | |
name: "allow-nodeport-my-shell" | |
spec: | |
podSelector: | |
matchLabels: | |
run: "my-shell" | |
policyTypes: | |
ingress: | |
- ports: | |
- protocol: TCP | |
port: 8080 | |
egress: | |
- ports: | |
- port: 443 | |
protocol: TCP | |
- port: 80 | |
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dev-laptop] $ kubectl run my-shell --rm -i --tty --image registry.example.com/some-org/docker-debianimage -- bash | |
[no-name] $ ping google.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment