-
Notifications
You must be signed in to change notification settings - Fork 36
Specify network type for Pods
Huanyu He edited this page Mar 21, 2022
·
8 revisions
Once a Pod's network type is specified, it will always be created with the resources of specified type. The "networking.alibaba.com/network-type"
annotation of Pods can be used to do this. Two types is available now, Overlay
or Underlay
.
For example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: curl-deployment
spec:
selector:
matchLabels:
app: curl
replicas: 6
template:
metadata:
annotations:
networking.alibaba.com/network-type: Overlay # All the Pods created by this deployment will be overlay.
labels:
app: curl
spec:
containers:
- args:
- -c
- sleep 999999999
command:
- /bin/sh
name: curl
image: tutum/curl:alpine