JCNR을 사용한 서비스 체인(cSRX) 구축
클라우드 네이티브 라우터를 사용하여 보안 서비스 인스턴스(cSRX)를 사용자 지정하고 구축하는 방법에 대해 알아보려면 이 섹션을 읽어보십시오.
주니퍼 클라우드 네이티브 라우터(JCNR)를 주니퍼의 컨테이너화된 SRX(cSRX) 플랫폼과 통합하여 IPsec과 같은 보안 서비스를 제공할 수 있습니다. 호스트 기반 서비스 체이닝을 사용하여 클라우드 네이티브 라우터는 동일한 Kubernetes 클러스터에 있는 보안 서비스 인스턴스(cSRX)와 체이닝됩니다. cSRX 인스턴스는 L3 모드에서 포드 서비스로 실행됩니다. cSRX 인스턴스는 Helm 차트를 통해 사용자 정의 및 구축됩니다.
클라우드 네이티브 라우터를 설치할 때 또는 JCNR을 설치한 후에 주니퍼 cSRX를 구축할 수 있는 옵션이 있습니다. 사용 가능한 패키지에 대한 설명은 클라우드 네이티브 라우터 소프트웨어 다운로드 패키지 를 참조하십시오.
cSRX는 모든 클라우드 네이티브 라우터 플랫폼에서 지원됩니다.
| 플랫폼 | cSRX |
|---|---|
| 베어메탈 | 예 |
| 레드햇 오픈시프트 | 예 |
| 아마존 EKS | 예 |
| Google Cloud 플랫폼 | 예 |
| Wind River 클라우드 플랫폼 | 예 |
| 마이크로소프트 애저 | 예 |
| VMWare 탄즈 | 예 |
기존 클라우드 네이티브 라우터 설치에 cSRX 설치
기존 클라우드 네이티브 라우터 설치에 cSRX 인스턴스를 설치하려면 다음 절차를 따르십시오. 이 절차를 시작하기 전에 모든 클라우드 네이티브 라우터 구성 요소가 제대로 실행되고 있는지 확인합니다.
클라우드 네이티브 라우터 설치 중 cSRX 설치
cSRX 라이선스 적용 및 cSRX 구성
다음 절차에 따라 cSRX 라이선스를 적용하고 주니퍼 cSRX를 구성합니다.
다음 단계에서는 cSRX와 클라우드 네이티브 라우터를 함께 설치하는 경우 주니퍼_Cloud_Native_Router_CSRX_<release> 디렉터리에 있고, 기존 클라우드 네이티브 라우터 설치에 cSRX 설치하는 경우 junos_csrx_<release> 디렉터리에 있다고 가정합니다.
cSRX Helm 차트 사용자 정의
cSRX 서비스 체이닝 인스턴스는 독립형 Helm 차트 또는 JCNR과 결합된 Helm 차트인 Helm 차트를 통해 배포됩니다. 구축은 다음 두 가지 필수 구성 요소로 구성됩니다.
-
csrx-init: 메인 cSRX 애플리케이션에 대한 구성을 준비하는 초기화 컨테이너입니다. values.yaml 파일에서 필요한 정보를 추출하고 처리하며 cSRX에 대한 구성 데이터를 생성합니다. 이렇게 하면 기본 cSRX 애플리케이션이 유효한 최신 구성으로 시작됩니다.
-
csrx: csrx는 주요 애플리케이션 컨테이너이자 cSRX 구축의 핵심 구성 요소입니다. 올바르게 작동하려면 컨테이너에서
csrx-init제공하는 구성에 의존합니다.
values.yaml 파일에서 구성 매개 변수 범위를 지정하여 cSRX 구축을 사용자 지정할 수 있습니다. 주요 구성 옵션은 다음과 같습니다.
-
kubeConfigPath: 클라우드 네이티브 라우터 및 cSRX를 설치하는 노드의 클러스터 kubeconfig 파일에 대한 경로입니다. cSRX 라이선스 적용 및 cSRX 구성의 1단계에서 클러스터 kubeconfig를 이 노드의 이 파일 위치에 cSRX cSRX 복사했습니다. 이 매개변수가 주석 처리되면 클러스터 kubeconfig가 /etc/kubernetes/kubelet.conf에 있는 것으로 가정됩니다.
-
interfaceType: JCNR에 연결할 cSRX의 인터페이스 유형입니다. 전용으로 설정해야 합니다.
vhost -
interfaceConfigs: 인터페이스 IP 주소, 게이트웨이 주소 및 선택적 경로를 정의하는 배열입니다. 인터페이스 IP는 배열의 요소와
localAddress일치해야 합니다.ipSecTunnelConfigs경로에는 복호화된 트래픽을 클라우드 네이티브 라우터로 조정하기 위한 접두사와 IPSec 게이트웨이에 대한 연결성 경로가 포함되어야 합니다. -
enableUserConfig:
-
설치 중에 cSRX가 지금 IPSec 터널을 생성하도록 하려면 로
false설정합니다. 이 Helm 차트의 섹션에서ipSecTunnelConfigsIPSec 터널을 정의하십시오. cSRX는 해당 구성에 따라 자동으로 구성(configlet)을 생성하고 cSRX 설치 중에 이를 적용합니다. -
나중에 IPSec 터널을 직접 생성하려는 경우 로
true설정합니다. 이 경우 이 Helm 차트에서 을(를ipSecTunnelConfigs) 정의하지 않습니다. 대신 구성 요소에서 직접 IPSec 구성을 정의하고 cSRX가 설치된 후 언제든지 명시적으로 적용합니다.
-
-
ipSecTunnelConfigs: 이것은 ike-phase1, 제안, 정책 및 게이트웨이 구성과 같은 IPsec 구성 세부 정보를 정의하는 배열입니다. 트래픽 선택기는 암호화될 것으로 예상되는 트래픽을 포함해야 합니다. 이 섹션은 로 설정된 경우에만
enableUserConfig적용됩니다.false -
jcnr_config: 클라우드 네이티브 라우터에서 cSRX로 트래픽을 조정하고 보안 서비스 체인을 적용하기 위해 원격 IPsec 게이트웨이에서 cSRX로 IPsec 트래픽을 조정하기 위해 클라우드 네이티브 라우터에서 구성할 경로를 정의하는 배열입니다.
-
텔레메트리: 텔레메트리를 사용하거나 사용하지 않도록 설정합니다.
다음은 독립형 cSRX 구축을 위한 기본 값입니다. yaml :
# Default values for cSRX.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Set to true if IPsec tunnels will be configured by user at a later stage
enableUserConfig: false # enable /disable user configuration
common:
registry: enterprise-hub.juniper.net/
repository: jcnr-container-prod/
csrxInit:
repository:
image: csrx-init
tag: 25.2.0.92
imagePullPolicy: IfNotPresent
resources:
#limits:
# memory: 1Gi
# cpu: 1
#requests:
# memory: 1Gi
# cpu: 1
csrx:
repository:
image: csrx
tag: 25.2R1.9
imagePullPolicy: IfNotPresent
resources:
limits:
hugepages-1Gi: 4Gi
memory: 4Gi
requests:
hugepages-1Gi: 4Gi
memory: 4Gi
csrxTelemetry:
repository:
image: contrail-telemetry-exporter
tag: 25.2.0.92
imagePullPolicy: IfNotPresent
resources:
# uncomment below if you are using a private registry that needs authentication
# registryCredentials - Base64 representation of your Docker registry credentials
# secretName - Name of the Secret object that will be created
#imagePullSecret:
#registryCredentials: <base64-encoded-credential>
#secretName: regcred
# nodeAffinity: Can be used to inject nodeAffinity for cSRX
# you may label the nodes where we wish to deploy cSRX and inject affinity accordingly
#nodeAffinity:
#- key: node-role.kubernetes.io/worker
# operator: Exists
#- key: node-role.kubernetes.io/master
# operator: DoesNotExist
#- key: kubernetes.io/hostname
# operator: In
# values:
# - example-host-1
# Toleration allows the cSRX related pods to tolerate nodes with specific taints
#tolerations:
#- key: "csrx"
# operator: "Equal"
# value: "yes"
# effect: "NoSchedule"
enableSecurityALg: false # enable /disable security alg
replicas: 1
interfaceType: "vhost"
interfaceConfigs:
#- name: ge-0/0/0
# ip: 181.1.1.1/30 # should match ipSecTunnelConfigs localAddress if configured
# gateway: 181.1.1.2 # gateway configuration
# ip6: 181:1:1::1/64 # optional
# ip6Gateway: 181:1:1::2 # optional
# routes: # this field is optional
# - "191.1.1.0/24"
# - "200.1.1.0/24"
# instance_parameters:
# name: "untrust"
# type: "vrf" # options include virtual-router or vrf
# vrfTarget: 10:10 # this option is valid only for vrf
#- name: ge-0/0/1
# ip: 1.21.1.1/30 # should match ipSecTunnelConfigs localAddress if configured
# gateway: 1.21.1.2 # gateway configuration
# ip6: 181:2:1::1/64 # optional
# ip6Gateway: 181:2:1::2 # optional
# routes: # this field is optional
# - "111.1.1.0/24"
# - "192.1.1.0/24"
# instance_parameters:
# name: "trust"
# type: "vrf" # options include virtual-router or vrf
# vrfTarget: 11:11 # this option is valid only for vrf
ipSecTunnelConfigs: # untrust
#Tunnel 1 config
#- interface: ge-0/0/0 ## section ike-phase1, proposal, policy, gateway
# gateway: 181.1.1.1
# localAddress: 171.1.1.1
# localIdentificationHostname: jcnr-csrx3.com #Optional
# remoteIdentificationHostname: jcnr-csrx1.com #Optional
# authenticationAlgorithm: sha-256
# encryptionAlgorithm: aes-256-cbc
# preSharedKey: "$9$zt3l3AuIRhev8FnNVsYoaApu0RcSyev8XO1NVYoDj.P5F9AyrKv8X"
# trafficSelector:
# - name: ts1
# localIP: 222.1.1.0/24 ## IP cannot be 0.0.0.0/0
# remoteIP: 111.1.1.0/24 ## IP cannot be 0.0.0.0/0
#Tunnel 2 config
#- interface: ge-0/0/0 ## section ike-phase1, proposal, policy, gateway
# gateway: 191.1.1.1
# localAddress: 171.1.1.1
# localIdentificationHostname: jcnr-csrx3.com #Optional
# remoteIdentificationHostname: jcnr-csrx1.com #Optional
# authenticationAlgorithm: sha-256
# encryptionAlgorithm: aes-256-cbc
# preSharedKey: "$9$zt3l3AuIRhev8FnNVsYoaApu0RcSyev8XO1NVYoDj.P5F9AyrKv8X"
# trafficSelector:
# - name: ts2
# localIP: 100.1.1.0/24 ## IP cannot be 0.0.0.0/0
# remoteIP: 200.1.1.0/24 ## IP cannot be 0.0.0.0/0
jcnr_config:
#- name: ge-0/0/0
# routes:
# - "121.1.1.0/24"
#csrx_flavor: specify the csrx deployment model. Corresponding values for csrx control and data
#must be provided based on the flavor mentioned below. Following are possible options:
# CSRX-2CPU-4G
# CSRX-4CPU-8G
# CSRX-6CPU-12G
# CSRX-8CPU-16G
# CSRX-16CPU-32G
# CSRX-20CPU-48G
csrx_flavor: CSRX-2CPU-4G
csrx_ctrl_cpu: "0x01"
csrx_data_cpu: "0x02"
telemetry:
enable: false
gnmi: true
service:
type: ClusterIP
labels: {}
annotations: {}
clusterIP: ""
# List of IP addresses at which the cSRX telemetry service is available
# Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
externalIPs: []
# Only use if service.type is "LoadBalancer"
loadBalancerIP: ""
# Ports to expose on each node
# Only used if service.type is "NodePort"
nodePort:
prometheus: 30073
gnmi: 30077
contrail_k8s_applier:
image: contrail-k8s-applier
tag: 25.2.0.92
pullPolicy: IfNotPresent
csrx_log_path: "/var/log/csrx/"
cSRX 구성 예는 주니퍼 클라우드 네이티브 라우터 사용자 가이드의 IPsec 보안 서비스를 참조하십시오.