Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 프라이빗 EC2 접속
- 엔지니어블로그
- 독서노트
- 문과남자의 과학공부
- TCP/IP
- client vpn
- client vpn 인증서
- 비공개 GKE autorized
- AWS session manager
- 티스토리
- Terraform GKE
- Terrafrom GCP
- Session Manager
- Terraform GCP GKE
- velog
- ACM 도메인
- S3
- s3 upload 400
- AWS private EC2
- AWS client VPN 인증서
- ACM
- 비공개 GKE
- aws
- Encapsulation
- java s3 400
- Decapsulation
- 벨로그
- 테라폼 private GKE
Archives
- Today
- Total
망지로그
CKA - networkpolicy 본문
https://kubernetes.io/docs/concepts/services-networking/network-policies/
Network Policies
If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4), NetworkPolicies allow you to specify rules for traffic flow within your cluster, and also between Pods and the outside world. Your cluster must use a network plugin tha
kubernetes.io
egress 여러개 network poliy추가하기 + pod selector 통해서 어떤 pod에 적용되는 네트워크 폴리시인지 확인할 수 있다.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: internal-policy
namespace: default
spec:
podSelector:
matchLabels:
name: internal
policyTypes:
- Egress
- Ingress
ingress:
- {}
egress:
- to:
- podSelector:
matchLabels:
name: mysql
ports:
- protocol: TCP
port: 3306
- to:
- podSelector:
matchLabels:
name: payroll
ports:
- protocol: TCP
port: 8080
- ports:
- port: 53
protocol: UDP
- port: 53
protocol: TCP
'Kubernetes' 카테고리의 다른 글
CKA-storage class (0) | 2024.07.02 |
---|---|
CKA- pv,pvc (0) | 2024.07.02 |
CKA - security context (0) | 2024.07.01 |
CKA - secrets;private registry (0) | 2024.07.01 |
CKA- service account (0) | 2024.07.01 |