EKS導入のためのCloud-Native Router Helm Chartのカスタマイズ
Juniper Cloud-Native RouterをL3モードでAmazon EKSにデプロイして運用できます。展開モードを設定するには、展開前に values.yaml ファイル内の適切な属性を編集します。
Helm チャートの属性と説明
Juniper_Cloud_Native_Router_release-number/helmchart/values.yaml ファイルを使用して Helm チャートをカスタマイズします。Helm チャートの構成キーを以下の表に示します。
| キー | 追加のキー 構成の説明 | |
|---|---|---|
| 記帳 | vRouter、cRPD、およびjcnr-cniコンテナイメージのDockerレジストリを定義します。 デフォルト値は次のように設定されています。
|
|
| リポジトリ | vRouter、cRPD、およびjcnr-cniコンテナイメージのリポジトリパスを定義します。これはグローバルキーであり、「common」セクションの「repository」パスよりも優先されます。デフォルト値は次のとおりです。
|
|
| imagePullSecret (英語) | レジストリ認証資格情報を定義します。詳細は、「 リポジトリ資格証明の構成 」トピックを参照してください。 | |
| registryCredentials | Docker レジストリ資格情報の Base64 表現。 | |
| secretName (シークレット名) | 作成されるシークレットオブジェクトの名前。 | |
| コモン | vRouter、cRPD、およびjcnr-cniコンテナイメージのリポジトリパスとタグを定義します。デフォルトを使用します。 | |
| リポジトリ | リポジトリ パスを定義します。グローバルリポジトリキーが定義されている場合、優先されます。 デフォルト値は次のように設定されています。
|
|
| タグ | イメージ タグを定義します。デフォルト値は、Cloud-Native Routerのリリースバージョンに適したタグ番号に設定されています。 | |
| レプリカ | (オプション)マルチノードクラスタ内のワーカーノードにデプロイされたcRPDレプリカの数を示します。値を指定しない場合は、デフォルト値の 1 が考慮されます。このキーの値は、マルチノードクラスタに対して指定する必要があり、Cloud-Native Routerを導入する必要があるノード数と一致する必要があります。 | |
| storageClass | cRPDのストレージクラスの名前を示します。EKS デプロイの |
|
| awsリージョン | EKS デプロイの AWS リージョンを定義します。 | |
| noLocalSwitching | EKS導入には適用されません。 | |
| ファブリックインターフェイス | DPDK にバインドするインターフェイスの一覧を指定します。インターフェイス名の代わりにサブネットを指定することもできます。インターフェイス名とサブネットの両方が指定されている場合、インターフェイス名がサブネット/ゲートウェイの組み合わせよりも優先されます。サブネット/ゲートウェイの組み合わせは、マルチノード クラスタでインターフェイス名が異なる場合に便利です。
手記:Amazon EKS のファブリックインターフェイスを設定するには、[L3 のみ] セクションを使用します。L2のみおよびL2-L3セクションは、EKS展開には適用されません。
例えば: # L3 only
- eth1:
ddp: "off"
- eth2:
ddp: "off" |
|
| サブネット | インターフェイス名を入力する代替モード。例えば: - subnet: 10.40.1.0/24 gateway: 10.40.1.1 ddp: "off" 入力の |
|
| DDPの | EKS導入には適用されません。 |
|
| interface_mode | EKS導入には適用されません。 | |
| vlan-id-list | EKS導入には適用されません。 |
|
| ストーム制御プロファイル | EKS導入には適用されません。 |
|
| ネイティブVLAN ID | EKS導入には適用されません。 | |
| no-local-switching | EKS導入には適用されません。 | |
| fabricワークロードインターフェイス | EKS導入には適用されません。 | |
| log_level | ログの重大度を定義します。使用可能な値オプションは、DEBUG、INFO、WARN、および ERR です。
手記:
ジュニパーサポートから変更するように指示されない限り、log_levelはデフォルトのINFOに設定したままにします。 |
|
| log_path | 定義されたディレクトリには、contrail-vrouter-agent.log、contrail-vrouter-dpdk.logなど、Cloud-Native Routerに関連するさまざまな記述ログが格納されます。デフォルト値は /var/log/jcnr/ です。 |
|
| syslog_notifications | syslog-ng で生成された通知を JSON 形式で保存するファイルへの絶対パスを示します。デフォルト値は /var/log/jcnr/jcnr_notifications.json です。 |
|
| nodeAffinity | (オプション)ノードのラベルを定義して、vRouter Pod を配置する場所を決定します。デフォルトでは、vRouter Pod はクラスタのすべてのワーカーノードにデプロイされます。 以下の例では、ノードアフィニティラベルは「key1=jcnr」と定義されています。このラベルは、Cloud-Native Routerを導入する必要がある各ノードに適用する必要があります。 nodeAffinity:
- key: key1
operator: In
values:
- jcnr
手記:
このキーはグローバル設定です。 |
|
| 鍵 | ノード アフィニティを適用するために一致する必要があるノード ラベルを表すキーと値のペア。 | |
| 演算子 | ノードラベルと、ポッド仕様の matchExpression パラメーターの値のセットとの関係を定義します。この値には、In、NotIn、Exists、DoesNotExist、Lt、または Gt を指定できます。 | |
| cni_bin_dir | (オプション)デフォルトのパスは /opt/cni/bin です。デフォルトのcniパスを、ディストリビューションで使用されるパス(/var/opt/cni/binなど)で上書きできます。 | |
| grpcTelemetryPort | (オプション)このパラメーターの値を入力して、cRPD テレメトリ gRPC サーバーのデフォルト ポート 50051 を上書きします。 |
|
| grpcVrouterPort | (オプション)このパラメータの値を入力して、vRouter gRPCサーバーのデフォルトポート50052を上書きします。 | |
| vRouterDeployerPort | (オプション)デフォルト値は 8081 です。デフォルトポートが利用できない場合に上書きするように設定します。 | |
| インターフェイスの復元 | このキーの値を true に設定して、vRouter Pod がクラッシュまたは再起動した場合にインターフェイスを元の状態に戻すことをお勧めします。 | |
| bondInterfaceConfigs (ボンドインターフェイス設定) | EKS導入には適用されません。 | |
| MTU | すべての物理インターフェイス(VFおよびPF)のMTU(最大伝送単位)値。デフォルト値は 9000 です。 | |
| cpu_core_mask | vRouter フォワード コア マスクを示します。qos が有効になっている場合は、4 つの CPU コアを割り当てる必要があります。EC2 インスタンスのホスト OS で使用されていないコアを使用します。 |
|
| stormControlProfiles | EKS導入には適用されません。 | |
| DDPの | EKS導入には適用されません。 | |
| qos有効化 | EKS デプロイの場合は false に設定します。 |
|
| コアパターン | コア ファイルの生成方法を示すコア パターンを示します。この設定を空白のままにすると、Cloud-Native Routerポッドはデフォルトパターンを上書きしません。
手記:
JCNR をデプロイする前に、ホストで corePattern 値を設定します。 |
|
| coreFileパス | コア・ファイルのパスを示します。値を空白のままにすると、vRouter は /var/crashes をデフォルト値と見なします。 | |
| vrouter_dpdk_uio_driver | uio ドライバは vfio-pciです。 |
Amazon EKS の場合は、helmchart/charts/jcnr-vrouter/values.yaml ファイルの dpdkCommandAdditionalArgs キーをさらに更新し、tx 記述子と rx 記述子を 256 に設定する必要があります。例えば:
dpdkCommandAdditionalArgs: "--yield_option 0 --dpdk_txd_sz 256 --dpdk_rxd_sz 256"
サンプル Helm チャート
EKS Cloud-Native RouterのHelmチャートのサンプルを以下に示します。
Amazon EKS導入用Helmチャート(ジュニパーサポートサイト経由のサブスクリプション)
動作する Amazon EKS L3 Helm チャートのサンプルを以下に示します。設定されたセクションは 太字で強調表示されます。
####################################################################
# Common Configuration (global vars) #
####################################################################
global:
registry: enterprise-hub.juniper.net/
# uncomment below if all images are available in the same path; it will
# take precedence over "repository" paths under "common" section below
repository: jcnr/
# 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: regcreds
common:
vrouter:
repository: atom-docker/cn2/bazel-build/dev/
tag: R23.3-183
crpd:
repository: junos-docker-local/warthog/
tag: 23.3R1.8
jcnrcni:
repository: junos-docker-local/warthog/
tag: 23.3-20230918-1b118ad
# Number of replicas for cRPD; this option must be used for multinode clusters
# JCNR will take 1 as default if replicas is not specified
replicas: “2”
# storageClass: Name of the storage class for cRPD. This option is must for
# cloud deployments such as AWS where gp2 can be used
storageClass: gp2
# Set AWS Region for AWS deployments
awsregion: us-east-1
#noLocalSwitching: [700]
# fabricInterface: provide a list of interfaces to be bound to dpdk
# You can also provide subnets instead of interface names. Interfaces name take precedence over
# Subnet/Gateway combination if both specified (although there is no reason to specify both)
# Subnet/Gateway combination comes handy when the interface names vary in a multi-node cluster
fabricInterface:
#########################
# L2 only
#- eth1:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
#- eth2:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [700]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
#- bond0:
# ddp: "auto" # auto/on/off # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# #native-vlan-id: 100
# #no-local-switching: true
#########################
# L3 only
#- eth11:
# ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off
#- eth2:
# ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off
########################
# L2L3
#- eth1:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
#- eth2:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
##################################
# Provide subnets instead of interface names
# Interfaces will be auto-detected in each subnet
# Only one of the interfaces or subnet range must
# be configured. This form of input is particularly
# helpful when the interface names vary in a multi-node
# K8s cluster
- subnet: 10.0.3.0/24
gateway: 10.0.3.1
ddp: "off"
- subnet: 10.0.5.0/24
gateway: 10.0.5.1
ddp: "off"
##################################
# fabricWorkloadInterface is applicable only for Pure L2 deployments
#
#fabricWorkloadInterface:
#- enp59s0f1v0:
# interface_mode: access
# vlan-id-list: [700]
#- enp59s0f1v1:
# interface_mode: trunk
# vlan-id-list: [800, 900]
#########################
# defines the log severity. Possible options: DEBUG, INFO, WARN, ERR
log_level: "INFO"
# "log_path": this directory will contain various jcnr related descriptive logs
# such as contrail-vrouter-agent.log, contrail-vrouter-dpdk.log etc.
log_path: "/var/log/jcnr/"
# "syslog_notifications": absolute path to the file that will contain syslog-ng
# generated notifications in json format
syslog_notifications: "/var/log/jcnr/jcnr_notifications.json"
# nodeAffinity: Can be used to inject nodeAffinity for vRouter, cRPD and syslog-ng pods
# You may label the nodes where we wish to deploy JCNR and inject affinity accodingly
nodeAffinity:
- key: key1
operator: In
values:
- jcnr
# cni_bin_dir: Path where the CNI binary will be put; default: /opt/cni/bin
# this may be overriden in distributions other than vanilla K8s
# e.g. OpenShift - you may use /var/lib/cni/bin or /etc/kubernetes/cni/net.d
#cni_bin_dir: /var/lib/cni/bin
# grpcTelemetryPort: use this parameter to override cRPD telemetry gRPC server default port of 50051
#grpcTelemetryPort: 50055
# grpcVrouterPort: use this parameter to override vRouter gRPC server default port of 50052
#grpcVrouterPort: 50060
# vRouterDeployerPort: use this parameter to override vRouter deployer port default port of 8081
#vRouterDeployerPort: 8082
jcnr-vrouter:
# restoreInterfaces: setting this to true will restore the interfaces
# back to their original state in case vrouter pod crashes or restarts
restoreInterfaces: true
# Enable bond interface configurations L2 only or L2 L3 deployment
#bondInterfaceConfigs:
# - name: "bond0"
# mode: 1 # ACTIVE_BACKUP MODE
# slaveInterfaces:
# - "enp59s0f0v0"
# - "enp59s0f0v1"
# MTU for all physical interfaces( all VF’s and PF’s)
mtu: "9000"
# vrouter fwd core mask
# if qos is enabled, you will need to allocate 4 CPU cores (primary and siblings)
cpu_core_mask: "2,3,22,23"
# rate limit profiles for bum traffic on fabric interfaces in bytes per second
stormControlProfiles:
rate_limit_pf1:
bandwidth:
level: 0
#rate_limit_pf2:
# bandwidth:
# level: 0
# Set ddp to enable Dynamic Device Personalization (DDP)
# Provides datapath optimization at NIC for traffic like GTPU, SCTP etc.
# Options include auto or on or off; default: off
ddp: "auto"
# Set true/false to Enable or Disable QOS, note: QOS is not supported on X710 NIC.
qosEnable: false
# core pattern to denote how the core file will be generated
# if left empty, JCNR pods will not overwrite the default pattern
corePattern: ""
# path for the core file; vrouter considers /var/crashes as default value if not specified
coreFilePath: /var/crash
# uio driver will be vfio-pci
vrouter_dpdk_uio_driver: "vfio-pci"
EKS デプロイの Helm チャート (AWS Marketplace 経由のサブスクリプション)
動作する Amazon EKS L3 Helm チャートのサンプルを以下に示します。設定されたセクションは 太字で強調表示されます。
####################################################################
# Common Configuration (global vars) #
####################################################################
global:
registry: 709825985650.dkr.ecr.us-east-1.amazonaws.com/
# uncomment below if all images are available in the same path; it will
# take precedence over "repository" paths under "common" section below
repository: juniper-networks/
# 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: regcreds
common:
vrouter:
repository: juniper-networks/
tag: R23.3-183
crpd:
repository: juniper-networks/
tag: 23.3R1.8
jcnrcni:
repository: juniper-networks/
tag: 23.3-20230918-1b118ad
# Number of replicas for cRPD; this option must be used for multinode clusters
# JCNR will take 1 as default if replicas is not specified
replicas: “2”
# storageClass: Name of the storage class for cRPD. This option is must for
# cloud deployments such as AWS where gp2 can be used
storageClass: gp2
# Set AWS Region for AWS deployments
awsregion: us-east-1
#noLocalSwitching: [700]
# fabricInterface: provide a list of interfaces to be bound to dpdk
# You can also provide subnets instead of interface names. Interfaces name take precedence over
# Subnet/Gateway combination if both specified (although there is no reason to specify both)
# Subnet/Gateway combination comes handy when the interface names vary in a multi-node cluster
fabricInterface:
#########################
# L2 only
#- eth1:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
#- eth2:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [700]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
#- bond0:
# ddp: "auto" # auto/on/off # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# #native-vlan-id: 100
# #no-local-switching: true
#########################
# L3 only
#- eth11:
# ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off
#- eth2:
# ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off
########################
# L2L3
#- eth1:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
#- eth2:
# ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off
# interface_mode: trunk
# vlan-id-list: [100, 200, 300, 700-705]
# storm-control-profile: rate_limit_pf1
# native-vlan-id: 100
# no-local-switching: true
##################################
# Provide subnets instead of interface names
# Interfaces will be auto-detected in each subnet
# Only one of the interfaces or subnet range must
# be configured. This form of input is particularly
# helpful when the interface names vary in a multi-node
# K8s cluster
- subnet: 10.0.3.0/24
gateway: 10.0.3.1
ddp: "off"
- subnet: 10.0.5.0/24
gateway: 10.0.5.1
ddp: "off"
##################################
# fabricWorkloadInterface is applicable only for Pure L2 deployments
#
#fabricWorkloadInterface:
#- enp59s0f1v0:
# interface_mode: access
# vlan-id-list: [700]
#- enp59s0f1v1:
# interface_mode: trunk
# vlan-id-list: [800, 900]
#########################
# defines the log severity. Possible options: DEBUG, INFO, WARN, ERR
log_level: "INFO"
# "log_path": this directory will contain various jcnr related descriptive logs
# such as contrail-vrouter-agent.log, contrail-vrouter-dpdk.log etc.
log_path: "/var/log/jcnr/"
# "syslog_notifications": absolute path to the file that will contain syslog-ng
# generated notifications in json format
syslog_notifications: "/var/log/jcnr/jcnr_notifications.json"
# nodeAffinity: Can be used to inject nodeAffinity for vRouter, cRPD and syslog-ng pods
# You may label the nodes where we wish to deploy JCNR and inject affinity accodingly
nodeAffinity:
- key: key1
operator: In
values:
- jcnr
# cni_bin_dir: Path where the CNI binary will be put; default: /opt/cni/bin
# this may be overriden in distributions other than vanilla K8s
# e.g. OpenShift - you may use /var/lib/cni/bin or /etc/kubernetes/cni/net.d
#cni_bin_dir: /var/lib/cni/bin
# grpcTelemetryPort: use this parameter to override cRPD telemetry gRPC server default port of 50051
#grpcTelemetryPort: 50055
# grpcVrouterPort: use this parameter to override vRouter gRPC server default port of 50052
#grpcVrouterPort: 50060
# vRouterDeployerPort: use this parameter to override vRouter deployer port default port of 8081
#vRouterDeployerPort: 8082
jcnr-vrouter:
# restoreInterfaces: setting this to true will restore the interfaces
# back to their original state in case vrouter pod crashes or restarts
restoreInterfaces: true
# Enable bond interface configurations L2 only or L2 L3 deployment
#bondInterfaceConfigs:
# - name: "bond0"
# mode: 1 # ACTIVE_BACKUP MODE
# slaveInterfaces:
# - "enp59s0f0v0"
# - "enp59s0f0v1"
# MTU for all physical interfaces( all VF’s and PF’s)
mtu: "9000"
# vrouter fwd core mask
# if qos is enabled, you will need to allocate 4 CPU cores (primary and siblings)
cpu_core_mask: "2,3,22,23"
# rate limit profiles for bum traffic on fabric interfaces in bytes per second
stormControlProfiles:
rate_limit_pf1:
bandwidth:
level: 0
#rate_limit_pf2:
# bandwidth:
# level: 0
# Set ddp to enable Dynamic Device Personalization (DDP)
# Provides datapath optimization at NIC for traffic like GTPU, SCTP etc.
# Options include auto or on or off; default: off
ddp: "auto"
# Set true/false to Enable or Disable QOS, note: QOS is not supported on X710 NIC.
qosEnable: false
# core pattern to denote how the core file will be generated
# if left empty, JCNR pods will not overwrite the default pattern
corePattern: ""
# path for the core file; vrouter considers /var/crashes as default value if not specified
coreFilePath: /var/crash
# uio driver will be vfio-pci
vrouter_dpdk_uio_driver: "vfio-pci"