Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Customize JCNR Configuration (Google Cloud Marketplace)

SUMMARY Read this topic to understand how to customize JCNR configuration using a ConfigMap.

JCNR ConfigMap

Starting with Juniper Cloud-Native Router (JCNR) Release 23.3, JCNR supports customizing configuration using a ConfigMap when deployed in L3 mode. In cloud-based deployments, in the event of a node failure, the JCNR pods may be spawned on newer or different nodes. A ConfigMap decouples the configuration parameters from node names and is based on node labels instead. This enables the JCNR CNI deployer to consume the configuration parameters, apply them to the cRPD configuration template and render the configuration, as long as a matching label is available for the node.

A ConfigMap is an API object to store data in key-values pairs. A ConfigMap defines per node variables that are consumed by nodes matching the label. The key-value pairs are used to render the configuration via a go template. The configured template must be uploaded to the JCNR deployment wizard in the Google Cloud Marketplace.


You must apply the ConfigMap before installing JCNR to create cRPD pods with default or custom configuration. The cRPD pod must be deleted and respawned should you wish to apply the configuration parameters any time after JCNR installation. The configuration parameters are applied by default to any newly spawned cRPD pods.

Configuration Example

Sample ConfigMap and template files are provided below.

You define the key-value pair for different node labels in your cluster. An example of the cRPD Config Template file is provided below:

The key-value pairs you define in the annotations is used to render the cRPD configuration via a go template. An example of the cRPD Config Map template file is provided below:


You can define additional cRPD configuration hierarchies in the template. The values to be rendered from the ConfigMap defined in the jcnr-params-configmap.yaml must be defined as {{.Params.var-name}}. Any environment variables, such as variables defined in values.yaml, must be defined as {{.Env.variable_name}}.

Deploy the cloud-native router. Once the installation completes, access the cRPD CLI and issue the show configuration | display set command in the cli mode to view the custom configuration you applied.

Modifying the ConfigMap

If you wish to change the ConfigMap any time after JCNR installation, you must delete the cRPD pod and respawn it using the following command:This triggers a rolling restart of all cRPD pods. Alternatively, you can identify the cRPD pods on nodes for which the ConfigMap has changed and manually delete the pod. The ConfigMap changes will be applied automatically to any respawned pods.


The cRPD pod continues to restart in CrashLoopBackOff state if invalid configuration is rendered and applied via the go template. You can apply the rendered configuration manually to a running cRPD pod to validate the configuration and identify issues. For GCP deployment you can find the rendered config in /config directory on the JCNR host as juniper.conf.master.