1.kubectl创建的多网卡yml文件
kind: Pod
apiVersion: v1
metadata:
name: sdssss
generateName: sdssss
labels:
app: sdssss
pod-template-hash: 667df8c6d7
annotations:
k8s.v1.cni.cncf.io/networks: macvlan-conf
k8s.v1.cni.cncf.io/networks-status: ''
kubesphere.io/containerSecrets: ''
v1.multus-cni.io/default-network: default/macvlan-conf
spec:
containers:
- name: nginx-0cjkcx
image: nginx
ports:
- name: http-d
containerPort: 80
protocol: TCP
resources:
limits:
cpu: 500m
memory: 500Mi
requests:
cpu: 10m
memory: 10Mi
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
serviceAccountName: default
serviceAccount: default
nodeName: ks-allinone
securityContext: {}
affinity: {}
schedulerName: default-scheduler
tolerations:
- key: node.kubernetes.io/not-ready
operator: Exists
2.kubectl describe pod sdssss -n defaul
获取的信息
Name: sdssss
Namespace: default
Priority: 0
Node: ks-allinone/192.168.40.169
Start Time: Wed, 22 Apr 2020 16:31:14 +0800
Labels: app=sdssss
pod-template-hash=667df8c6d7
Annotations: k8s.v1.cni.cncf.io/networks: macvlan-conf
k8s.v1.cni.cncf.io/networks-status:
[{
“name”: “macvlan-conf”,
“interface”: “eth0”,
“ips”: [
“192.168.40.160″
],
“mac”: “ee:0f:3a:e8:e6:1c”,
“default”: true,
“dns”: {}
},{
“name”: “macvlan-conf”,
“interface”: “net1”,
“ips”: [
“192.168.40.151″
],
“mac”: “8e:a0:de:cb:8c:98”,
“dns”: {}
}]
kubesphere.io/containerSecrets:
v1.multus-cni.io/default-network: default/macvlan-conf
Status: Running
IP: 192.168.40.160
Containers:
nginx-0cjkcx:
Container ID: docker://a538052ec2d96ff54ac5dc06acf75809c73783ad2c1fdd8a02c421389d192ca1
Image: nginx
Image ID: docker-pullable://nginx@sha256:d81f010955749350ef31a119fb94b180fde8b2f157da351ff5667ae037968b28
Port: 80/TCP
Host Port: 0/TCP
State: Running
Started: Wed, 22 Apr 2020 16:31:53 +0800
Ready: True
Restart Count: 0
Limits:
cpu: 500m
memory: 500Mi
Requests:
cpu: 10m
memory: 10Mi
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-5djf5 (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
default-token-5djf5:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-5djf5
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Normal Pulling 34s kubelet, ks-allinone Pulling image “nginx”
Normal Pulled 7s kubelet, ks-allinone Successfully pulled image “nginx”
Normal Created 6s kubelet, ks-allinone Created container nginx-0cjkcx
Normal Started 5s kubelet, ks-allinone Started container nginx-0cjkcx
3.通过ui创建多网卡失败,

4.kubectl describe pod sdssss -n default
获取到错误信息
