Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply multus-cni unexpected EOF #1340

Open
120L020314 opened this issue Sep 23, 2024 · 0 comments
Open

apply multus-cni unexpected EOF #1340

120L020314 opened this issue Sep 23, 2024 · 0 comments

Comments

@120L020314
Copy link

I first apply the plugin,it works successfully:

kubectl apply -f https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset.yml

but when i second apply:

kubectl apply -f multi.yaml

it shows error:

error: error when creating "multi.yaml": Post "https://192.168.31.105:8443/apis/k8s.cni.cncf.io/v1/namespaces/default/network-attachment-definitions?fieldManager=kubectl-client-side-apply": unexpected EOF

multi.yaml:
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-conf
spec:
config: '{
"cniVersion": "0.3.1",
"type": "macvlan",
"master": "ens33",
"mode": "bridge",
"ipam": {
"type": "host-local",
"subnet": "192.168.31.0/24",
"rangeStart": "192.168.31.106",
"rangeEnd": "192.168.31.206",
"gateway": "192.168.31.2",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
}'

my cluster:
root@m-01:/home/m-01/Downloads/testyaml# kubectl get node
NAME STATUS ROLES AGE VERSION
m-01 Ready 173d v1.22.10
n-01 NotReady 173d v1.22.18-rc.0.1+bc4763cbf8b9e6-dirty
n-02 Ready 173d v1.22.18-rc.0.1+bc4763cbf8b9e6-dirty

my default cni plugin:
{
"name": "cbr0",
"cniVersion": "0.3.1",
"type": "flannel",
"delegate": {
"hairpinMode": true,
"isDefaultGateway": true,
"hairpinMode": true,
"isDefaultGateway": true,
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"mtu": 1450
},
"ipam": {
"type": "host-local",
"ranges": [
[
{
"subnet": "10.244.0.0/12"
}
]
]
}
}

i needs my pod to have two ip,how can i solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant