añadiendo ejemplo de multus
This commit is contained in:
17
coredns/configmap.yaml
Normal file
17
coredns/configmap.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: coredns-config
|
||||
namespace: coredns-multus
|
||||
data:
|
||||
Corefile: |
|
||||
.:53 {
|
||||
log
|
||||
errors
|
||||
forward . 8.8.8.8
|
||||
cache 30
|
||||
hosts {
|
||||
192.168.0.41 apolo.c2et.com
|
||||
fallthrough
|
||||
}
|
||||
}
|
||||
32
coredns/deployment.yaml
Normal file
32
coredns/deployment.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: coredns-multus
|
||||
namespace: coredns-multus
|
||||
annotations:
|
||||
k8s.v1.cni.cncf.io/networks: |
|
||||
[
|
||||
{ "name": "br-admin", "namespace": "kube-system" },
|
||||
{ "name": "br-srv", "namespace": "kube-system" }
|
||||
]
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: coredns
|
||||
image: coredns/coredns:1.11.1
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/coredns/Corefile
|
||||
subPath: Corefile
|
||||
ports:
|
||||
- containerPort: 53
|
||||
protocol: UDP
|
||||
- containerPort: 53
|
||||
protocol: TCP
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: coredns-config
|
||||
tolerations:
|
||||
- operator: "Exists"
|
||||
dnsPolicy: "Default"
|
||||
4
coredns/namespace.yaml
Normal file
4
coredns/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: coredns-multus
|
||||
20
coredns/net-attach-def-admin.yaml
Normal file
20
coredns/net-attach-def-admin.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: "k8s.cni.cncf.io/v1"
|
||||
kind: NetworkAttachmentDefinition
|
||||
metadata:
|
||||
name: br-admin
|
||||
namespace: coredns-multus
|
||||
spec:
|
||||
config: '{
|
||||
"cniVersion": "0.3.1",
|
||||
"type": "bridge",
|
||||
"bridge": "br-admin",
|
||||
"ipam": {
|
||||
"type": "static",
|
||||
"addresses": [
|
||||
{
|
||||
"address": "192.168.1.100/24",
|
||||
"gateway": "192.168.1.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}'
|
||||
20
coredns/net-attach-def-srv.yaml
Normal file
20
coredns/net-attach-def-srv.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: "k8s.cni.cncf.io/v1"
|
||||
kind: NetworkAttachmentDefinition
|
||||
metadata:
|
||||
name: br-srv
|
||||
namespace: coredns-multus
|
||||
spec:
|
||||
config: '{
|
||||
"cniVersion": "0.3.1",
|
||||
"type": "bridge",
|
||||
"bridge": "br-srv",
|
||||
"ipam": {
|
||||
"type": "static",
|
||||
"addresses": [
|
||||
{
|
||||
"address": "192.168.200.100/22",
|
||||
"gateway": "192.168.200.1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}'
|
||||
Reference in New Issue
Block a user