This document holds information about modifying or replacing builtin defaults and is only recommended to advanced users. Please make sure to have read the networking overview page before treading into these things.
If a network has a name "default", it will override the default network added by rkt. It is strongly recommended that such network also has type "ptp" as it protects from the pod spoofing its IP address and defeating identity management provided by the metadata service.
The network backend CNI allows the passing of arguments as plugin parameters, specifically
CNI_ARGS, at runtime.
These arguments can be used to reconfigure a network without changing the configuration file.
rkt supports the
CNI_ARGS variable through the command line argument
The syntax for passing arguments to a network looks like
When executed from a shell, you can use double quotes to avoid
; being interpreted as a command separator by the shell.
To allow the passing of arguments to different networks simply append the arguments to the network name with a colon (
:), and separate the arguments by semicolon (
All arguments can either be given in a single instance of the
--net, or can be spread across multiple uses of
Reminder: the separator for the networks (and their arguments) within one
--net instance is the comma
A network name must not be passed more than once, not within the same nor throughout multiple instances of
This example will override the IP in the networks net1 and net2.
rkt run --net="net1:IP=126.96.36.199" --net="net2:IP=188.8.131.52" pod.aci
This example will load all configured networks and override the IP addresses for net1 and net2.
rkt run --net="all,net1:IP=184.108.40.206" --net="net2:IP=220.127.116.11" pod.aci
This is not documented yet. Please follow CNI issue #56 to track the progress of the documentation.