Configure multus with the portmap plugin
With the introduction of Multus CNI, the portmap chained plugin was no longer configured. This commit simply adds the portmap plugin to the Multus configuration template. The portmap plugin allows a user to create a pod/deployment with a host->container port mapping by including the hostPort, containerPort in the container specification. ie: spec: containers: ports: - containerPort: 80 hostPort: 8089 In this example, one could access the service in the pod via container_ip:80 or node_ip:8089 Closes-Bug: 1832892 Change-Id: I0549bff242df881e652b742abdf4fb342b5d7a5e Signed-off-by: Steven Webster <steven.webster@windriver.com>
This commit is contained in:
parent
d42abdcb9e
commit
51d0cb7e04
|
@ -8,6 +8,8 @@
|
|||
# it has a lower lexographic order than the calico CNI configuration file.
|
||||
# - The configMap has been modified to work with Calico rather than Flannel
|
||||
# - The tuning plugin is used to update sysctl tcp_keepalive timers.
|
||||
# - The portmap plugin is enabled to allow forwarding from one or more ports
|
||||
# on the host to the container
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
|
@ -82,6 +84,9 @@ data:
|
|||
{
|
||||
"name": "multus-cni-network",
|
||||
"type": "multus",
|
||||
"capabilities": {
|
||||
"portMappings": true
|
||||
},
|
||||
"delegates": [
|
||||
{
|
||||
"cniVersion": "0.3.0",
|
||||
|
@ -116,6 +121,11 @@ data:
|
|||
"net.ipv4.tcp_keepalive_probes": "5",
|
||||
"net.ipv4.tcp_keepalive_time": "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "portmap",
|
||||
"snat": true,
|
||||
"capabilities": {"portMappings": true}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue