-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridge-net-dhcp.yaml
40 lines (40 loc) · 1.06 KB
/
bridge-net-dhcp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: bridge-net-dhcp
spec:
config: '{
"cniVersion": "0.4.0",
"name": "work-network",
"type": "bridge",
"bridge": "br0",
"master": "ens3",
"hairpinMode": true,
"ipam": {
"type": "dhcp"
}
}'
---
apiVersion: v1
kind: Secret
metadata:
name: bot-pull-secret
data:
.dockerconfigjson: ewogICJhdXRocyI6IHsKICAgICJxdWF5LmlvIjogewogICAgICAiYXV0aCI6ICJiVzFqYTJsbGNtNHJiVzFqYTJsbGNtNWZZbTkwT2taSE5UWkhNRlV5VlU5TVFUWmFOVFF6TkROQ1ZEQTFURkpYT1VjeVJUQXhRVlJIVTB4S1JrRlpXVXRCVjFBeU1qTlNXRWRLVEZaRFRrSTFRelZHVmtnPSIsCiAgICAgICJlbWFpbCI6ICIiCiAgICB9CiAgfQp9
type: kubernetes.io/dockerconfigjson
---
apiVersion: v1
kind: Pod
metadata:
name: bridge-net-dhcp-pod
annotations:
k8s.v1.cni.cncf.io/networks: bridge-net-dhcp
spec:
containers:
- name: testapp
image: quay.io/mmckiern/net-tools:latest
imagePullPolicy: Always
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do ip a && sleep 30; done;" ]
imagePullSecrets:
- name: bot-pull-secret