피드 구독

The TAP device plugin provides the ability to create tap devices in containers. A TAP device provides frame reception and transmission for user space programs. It can be seen as an interface, which, instead of receiving frames from a traditional network interface, receives them from user space applications, and instead of sending frames via a traditional network interface, writes them to the user space application. For more information please see here: https://www.kernel.org/doc/html/v5.8/networking/tuntap.html

Installing

The feature will be available in OpenShift 4.13 as Developer Preview. No further installation steps are required.

Configuring a TAP device

A sample TAP device CNI plugin configuration is shown below:

       {
       "type": "tap",
       "multiQueue": true,
       "selinuxcontext": "system_u:system_r:container_t:s0"
       "owner": 0,
       "group": 0,
       "ipam": {...}
     }

 

Below is an explanation of the individual attributes of the configuration section:

  • Type - type of plugin: “tap.”
  • MultiQueue - enable multiqueue.
  • SELinuxcontext - for systems with the SELinux security module enabled, the context under which to create the TAP device.
  • Owner - the user owning the TAP device. If not specified the TAP device will have no owner assigned. If specified, the owner will be user with the specified user id, with 0 being the root user.
  • Group -  the group owning the tap device. If not specified the TAP device will have no owner assigned.  If specified, the group will be user with the specified group id.

To configure a TAP plugin in OpenShift a network-attachment-definition must be created:

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: tap
namespace: mmirecki
spec:
config: '{
   "cniVersion": "0.4.0",
   "name": "tap",
   "plugins": [
     {
       "type": "tap",
       "owner": 0,
       "group": 0,
       "multiQueue": true,
       "selinuxcontext": "system_u:system_r:container_t:s0"
       "ipam": {...}
     }
   ]
}'

 

The above created network must then be specified in the networks annotation of a pod:

---
apiVersion: v1
kind: Pod
metadata:
annotations:
  k8s.v1.cni.cncf.io/networks: '[
    {
     "name": "tap",
     "namespace": "mmirecki",
     "interface": "ext0",
     "mac": "50:00:00:00:00:10"
    }    
  ]'

 

Example use case

A sample use case for tap devices is creating TAP devices for use with DPDK applications.

Some DPDK applications use regular kernel networking to send low-volume traffic such as logs or messages. The DPDK application can use a TAP device for the slow path communication between the DPDK workload and the kernel networking.

Status

The TAP device feature will be available in OpenShift 4.13 as Developer Preview.

The use cases for the feature and available options are based on limited customer feedback. Additional feedback on possible use cases and missing functionality are welcome. Please contact your Red Hat account manager for further details.


저자 소개

UI_Icon-Red_Hat-Close-A-Black-RGB

채널별 검색

automation icon

오토메이션

기술, 팀, 인프라를 위한 IT 자동화 최신 동향

AI icon

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Original series icon

오리지널 쇼

엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리