1,原因:
因为想尝试calico 的东西,calio node daemonset 里的image 里安装工具等其他 都没有,没办法尝试
只能再打包image,或者简单一点的,挂个边车
另外kubectl spy 暂不支持 containerd
2,步骤
1) kubectl get daemonset calico-node -n kube-system -o yaml > calico-node-daemonset.yaml,并备份
2)修改yaml
修改 calico node daemonset
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: calico-node
namespace: kube-system
selfLink: /apis/apps/v1/namespaces/kube-system/daemonsets/calico-node
uid: 50ead574-7ca2-4d84-8fe3-c73898782adf
resourceVersion: ‘5785456’
generation: 2
creationTimestamp: ‘2020-12-18T05:52:21Z’
labels:
k8s-app: calico-node
annotations:
deprecated.daemonset.template.generation: ‘2’
kubectl.kubernetes.io/last-applied-configuration: >
{“apiVersion”:”apps/v1”,”kind”:”DaemonSet”,”metadata”:{“annotations”:{“deprecated.daemonset.template.generation”:”1”},”creationTimestamp”:”2020-12-18T05:52:21Z”,”generation”:1,”labels”:{“k8s-app”:”calico-node”},”managedFields”:[{“apiVersion”:”apps/v1”,”fieldsType”:”FieldsV1”,”fieldsV1”:{“f:metadata”:{“f:annotations”:{“.”:{},”f:deprecated.daemonset.template.generation”:{},”f:kubectl.kubernetes.io/last-applied-configuration”:{}},”f:labels”:{“.”:{},”f:k8s-app”:{}}},”f:spec”:{“f:revisionHistoryLimit”:{},”f:selector”:{“f:matchLabels”:{“.”:{},”f:k8s-app”:{}}},”f:template”:{“f:metadata”:{“f:labels”:{“.”:{},”f:k8s-app”:{}}},”f:spec”:{“f:containers”:{“k:{\”name\”:\”calico-node\”}”:{“.”:{},”f:env”:{“.”:{},”k:{\”name\”:\”CALICO_DISABLE_FILE_LOGGING\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”CALICO_IPV4POOL_IPIP\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”CALICO_IPV4POOL_VXLAN\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”CALICO_NETWORKING_BACKEND\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”CLUSTER_TYPE\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”DATASTORE_TYPE\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_DEFAULTENDPOINTTOHOSTACTION\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_DISABLECONNTRACKINVALIDCHECK\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_HEALTHENABLED\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_IPINIPMTU\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”FELIX_IPV6SUPPORT\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_LOGSEVERITYSCREEN\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_PROMETHEUSMETRICSENABLED\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_TYPHAK8SSERVICENAME\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”FELIX_VXLANMTU\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”FELIX_WIREGUARDMTU\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”IP\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”NODENAME\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:fieldRef”:{“.”:{},”f:apiVersion”:{},”f:fieldPath”:{}}}},”k:{\”name\”:\”WAIT_FOR_DATASTORE\”}”:{“.”:{},”f:name”:{},”f:value”:{}}},”f:envFrom”:{},”f:image”:{},”f:imagePullPolicy”:{},”f:livenessProbe”:{“.”:{},”f:exec”:{“.”:{},”f:command”:{}},”f:failureThreshold”:{},”f:initialDelaySeconds”:{},”f:periodSeconds”:{},”f:successThreshold”:{},”f:timeoutSeconds”:{}},”f:name”:{},”f:readinessProbe”:{“.”:{},”f:exec”:{“.”:{},”f:command”:{}},”f:failureThreshold”:{},”f:periodSeconds”:{},”f:successThreshold”:{},”f:timeoutSeconds”:{}},”f:resources”:{“.”:{},”f:requests”:{“.”:{},”f:cpu”:{}}},”f:securityContext”:{“.”:{},”f:privileged”:{}},”f:terminationMessagePath”:{},”f:terminationMessagePolicy”:{},”f:volumeMounts”:{“.”:{},”k:{\”mountPath\”:\”/lib/modules\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{},”f:readOnly”:{}},”k:{\”mountPath\”:\”/run/xtables.lock\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}},”k:{\”mountPath\”:\”/var/lib/calico\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}},”k:{\”mountPath\”:\”/var/run/calico\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}},”k:{\”mountPath\”:\”/var/run/nodeagent\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}}}}},”f:dnsPolicy”:{},”f:hostNetwork”:{},”f:initContainers”:{“.”:{},”k:{\”name\”:\”flexvol-driver\”}”:{“.”:{},”f:image”:{},”f:imagePullPolicy”:{},”f:name”:{},”f:resources”:{},”f:securityContext”:{“.”:{},”f:privileged”:{}},”f:terminationMessagePath”:{},”f:terminationMessagePolicy”:{},”f:volumeMounts”:{“.”:{},”k:{\”mountPath\”:\”/host/driver\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}}}},”k:{\”name\”:\”install-cni\”}”:{“.”:{},”f:command”:{},”f:env”:{“.”:{},”k:{\”name\”:\”CNI_CONF_NAME\”}”:{“.”:{},”f:name”:{},”f:value”:{}},”k:{\”name\”:\”CNI_MTU\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”CNI_NETWORK_CONFIG\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”KUBERNETES_NODE_NAME\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:fieldRef”:{“.”:{},”f:apiVersion”:{},”f:fieldPath”:{}}}},”k:{\”name\”:\”SLEEP\”}”:{“.”:{},”f:name”:{},”f:value”:{}}},”f:envFrom”:{},”f:image”:{},”f:imagePullPolicy”:{},”f:name”:{},”f:resources”:{},”f:securityContext”:{“.”:{},”f:privileged”:{}},”f:terminationMessagePath”:{},”f:terminationMessagePolicy”:{},”f:volumeMounts”:{“.”:{},”k:{\”mountPath\”:\”/host/etc/cni/net.d\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}},”k:{\”mountPath\”:\”/host/opt/cni/bin\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}}}},”k:{\”name\”:\”upgrade-ipam\”}”:{“.”:{},”f:command”:{},”f:env”:{“.”:{},”k:{\”name\”:\”CALICO_NETWORKING_BACKEND\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:configMapKeyRef”:{“.”:{},”f:key”:{},”f:name”:{}}}},”k:{\”name\”:\”KUBERNETES_NODE_NAME\”}”:{“.”:{},”f:name”:{},”f:valueFrom”:{“.”:{},”f:fieldRef”:{“.”:{},”f:apiVersion”:{},”f:fieldPath”:{}}}}},”f:envFrom”:{},”f:image”:{},”f:imagePullPolicy”:{},”f:name”:{},”f:resources”:{},”f:securityContext”:{“.”:{},”f:privileged”:{}},”f:terminationMessagePath”:{},”f:terminationMessagePolicy”:{},”f:volumeMounts”:{“.”:{},”k:{\”mountPath\”:\”/host/opt/cni/bin\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}},”k:{\”mountPath\”:\”/var/lib/cni/networks\”}”:{“.”:{},”f:mountPath”:{},”f:name”:{}}}}},”f:nodeSelector”:{“.”:{},”f:kubernetes.io/os”:{}},”f:priorityClassName”:{},”f:restartPolicy”:{},”f:schedulerName”:{},”f:securityContext”:{},”f:serviceAccount”:{},”f:serviceAccountName”:{},”f:terminationGracePeriodSeconds”:{},”f:tolerations”:{},”f:volumes”:{“.”:{},”k:{\”name\”:\”cni-bin-dir\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”cni-net-dir\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”flexvol-driver-host\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”host-local-net-dir\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”lib-modules\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”policysync\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”sysfs\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”var-lib-calico\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”var-run-calico\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}},”k:{\”name\”:\”xtables-lock\”}”:{“.”:{},”f:hostPath”:{“.”:{},”f:path”:{},”f:type”:{}},”f:name”:{}}}}},”f:updateStrategy”:{“f:rollingUpdate”:{“.”:{},”f:maxUnavailable”:{}},”f:type”:{}}}},”manager”:”kubectl”,”operation”:”Update”,”time”:”2020-12-18T05:52:21Z”},{“apiVersion”:”apps/v1”,”fieldsType”:”FieldsV1”,”fieldsV1”:{“f:status”:{“f:currentNumberScheduled”:{},”f:desiredNumberScheduled”:{},”f:numberAvailable”:{},”f:numberReady”:{},”f:observedGeneration”:{},”f:updatedNumberScheduled”:{}}},”manager”:”kube-controller-manager”,”operation”:”Update”,”time”:”2020-12-23T23:24:49Z”}],”name”:”calico-node”,”namespace”:”kube-system”,”resourceVersion”:”4300129”,”selfLink”:”/apis/apps/v1/namespaces/kube-system/daemonsets/calico-node”,”uid”:”50ead574-7ca2-4d84-8fe3-c73898782adf”},”spec”:{“revisionHistoryLimit”:10,”selector”:{“matchLabels”:{“k8s-app”:”calico-node”}},”template”:{“metadata”:{“creationTimestamp”:null,”labels”:{“k8s-app”:”calico-node”}},”spec”:{“containers”:[{“args”:[“/bin/sh”,”-c”,”sleep
10; touch /tmp/healthy; sleep
30000”],”image”:”busybox:1.28”,”name”:”busybox”,”readinessProbe”:{“exec”:{“command”:[“cat”,”/tmp/healthy”]},”initialDelaySeconds”:10,”periodSeconds”:5}},{“env”:[{“name”:”DATASTORE_TYPE”,”value”:”kubernetes”},{“name”:”FELIX_TYPHAK8SSERVICENAME”,”valueFrom”:{“configMapKeyRef”:{“key”:”typha_service_name”,”name”:”calico-config”}}},{“name”:”WAIT_FOR_DATASTORE”,”value”:”true”},{“name”:”NODENAME”,”valueFrom”:{“fieldRef”:{“apiVersion”:”v1”,”fieldPath”:”spec.nodeName”}}},{“name”:”CALICO_NETWORKING_BACKEND”,”valueFrom”:{“configMapKeyRef”:{“key”:”calico_backend”,”name”:”calico-config”}}},{“name”:”CLUSTER_TYPE”,”value”:”k8s,bgp”},{“name”:”IP”,”value”:”autodetect”},{“name”:”CALICO_IPV4POOL_IPIP”,”value”:”Never”},{“name”:”CALICO_IPV4POOL_VXLAN”,”value”:”CrossSubnet”},{“name”:”FELIX_IPINIPMTU”,”valueFrom”:{“configMapKeyRef”:{“key”:”veth_mtu”,”name”:”calico-config”}}},{“name”:”FELIX_VXLANMTU”,”value”:”1450”},{“name”:”FELIX_WIREGUARDMTU”,”valueFrom”:{“configMapKeyRef”:{“key”:”veth_mtu”,”name”:”calico-config”}}},{“name”:”CALICO_DISABLE_FILE_LOGGING”,”value”:”true”},{“name”:”FELIX_DEFAULTENDPOINTTOHOSTACTION”,”value”:”ACCEPT”},{“name”:”FELIX_IPV6SUPPORT”,”value”:”false”},{“name”:”FELIX_LOGSEVERITYSCREEN”,”value”:”info”},{“name”:”FELIX_HEALTHENABLED”,”value”:”true”},{“name”:”FELIX_PROMETHEUSMETRICSENABLED”,”value”:”true”},{“name”:”FELIX_DISABLECONNTRACKINVALIDCHECK”,”value”:”true”}],”envFrom”:[{“configMapRef”:{“name”:”kubernetes-services-endpoint”,”optional”:true}}],”image”:”docker-ecr001.rnd.gic.ericsson.se/calico/node:v3.16.5”,”imagePullPolicy”:”IfNotPresent”,”livenessProbe”:{“exec”:{“command”:[“/bin/calico-node”,”-felix-live”,”-bird-live”]},”failureThreshold”:6,”initialDelaySeconds”:10,”periodSeconds”:10,”successThreshold”:1,”timeoutSeconds”:1},”name”:”calico-node”,”readinessProbe”:{“exec”:{“command”:[“/bin/calico-node”,”-felix-ready”,”-bird-ready”]},”failureThreshold”:3,”periodSeconds”:10,”successThreshold”:1,”timeoutSeconds”:1},”resources”:{“requests”:{“cpu”:”250m”}},”securityContext”:{“privileged”:true},”terminationMessagePath”:”/dev/termination-log”,”terminationMessagePolicy”:”File”,”volumeMounts”:[{“mountPath”:”/lib/modules”,”name”:”lib-modules”,”readOnly”:true},{“mountPath”:”/run/xtables.lock”,”name”:”xtables-lock”},{“mountPath”:”/var/run/calico”,”name”:”var-run-calico”},{“mountPath”:”/var/lib/calico”,”name”:”var-lib-calico”},{“mountPath”:”/var/run/nodeagent”,”name”:”policysync”}]}],”dnsPolicy”:”ClusterFirst”,”hostNetwork”:true,”initContainers”:[{“command”:[“/opt/cni/bin/calico-ipam”,”-upgrade”],”env”:[{“name”:”KUBERNETES_NODE_NAME”,”valueFrom”:{“fieldRef”:{“apiVersion”:”v1”,”fieldPath”:”spec.nodeName”}}},{“name”:”CALICO_NETWORKING_BACKEND”,”valueFrom”:{“configMapKeyRef”:{“key”:”calico_backend”,”name”:”calico-config”}}}],”envFrom”:[{“configMapRef”:{“name”:”kubernetes-services-endpoint”,”optional”:true}}],”image”:”docker-ecr001.rnd.gic.ericsson.se/calico/cni:v3.16.5”,”imagePullPolicy”:”IfNotPresent”,”name”:”upgrade-ipam”,”resources”:{},”securityContext”:{“privileged”:true},”terminationMessagePath”:”/dev/termination-log”,”terminationMessagePolicy”:”File”,”volumeMounts”:[{“mountPath”:”/var/lib/cni/networks”,”name”:”host-local-net-dir”},{“mountPath”:”/host/opt/cni/bin”,”name”:”cni-bin-dir”}]},{“command”:[“/opt/cni/bin/install”],”env”:[{“name”:”CNI_CONF_NAME”,”value”:”10-calico.conflist”},{“name”:”CNI_NETWORK_CONFIG”,”valueFrom”:{“configMapKeyRef”:{“key”:”cni_network_config”,”name”:”calico-config”}}},{“name”:”KUBERNETES_NODE_NAME”,”valueFrom”:{“fieldRef”:{“apiVersion”:”v1”,”fieldPath”:”spec.nodeName”}}},{“name”:”CNI_MTU”,”valueFrom”:{“configMapKeyRef”:{“key”:”veth_mtu”,”name”:”calico-config”}}},{“name”:”SLEEP”,”value”:”false”}],”envFrom”:[{“configMapRef”:{“name”:”kubernetes-services-endpoint”,”optional”:true}}],”image”:”docker-ecr001.rnd.gic.ericsson.se/calico/cni:v3.16.5”,”imagePullPolicy”:”IfNotPresent”,”name”:”install-cni”,”resources”:{},”securityContext”:{“privileged”:true},”terminationMessagePath”:”/dev/termination-log”,”terminationMessagePolicy”:”File”,”volumeMounts”:[{“mountPath”:”/host/opt/cni/bin”,”name”:”cni-bin-dir”},{“mountPath”:”/host/etc/cni/net.d”,”name”:”cni-net-dir”}]},{“image”:”docker-ecr001.rnd.gic.ericsson.se/calico/pod2daemon-flexvol:v3.16.5”,”imagePullPolicy”:”IfNotPresent”,”name”:”flexvol-driver”,”resources”:{},”securityContext”:{“privileged”:true},”terminationMessagePath”:”/dev/termination-log”,”terminationMessagePolicy”:”File”,”volumeMounts”:[{“mountPath”:”/host/driver”,”name”:”flexvol-driver-host”}]}],”nodeSelector”:{“kubernetes.io/os”:”linux”},”priorityClassName”:”system-node-critical”,”restartPolicy”:”Always”,”schedulerName”:”default-scheduler”,”securityContext”:{},”serviceAccount”:”calico-node”,”serviceAccountName”:”calico-node”,”terminationGracePeriodSeconds”:0,”tolerations”:[{“effect”:”NoSchedule”,”operator”:”Exists”},{“key”:”CriticalAddonsOnly”,”operator”:”Exists”},{“effect”:”NoExecute”,”operator”:”Exists”}],”volumes”:[{“hostPath”:{“path”:”/lib/modules”,”type”:””},”name”:”lib-modules”},{“hostPath”:{“path”:”/var/run/calico”,”type”:””},”name”:”var-run-calico”},{“hostPath”:{“path”:”/var/lib/calico”,”type”:””},”name”:”var-lib-calico”},{“hostPath”:{“path”:”/run/xtables.lock”,”type”:”FileOrCreate”},”name”:”xtables-lock”},{“hostPath”:{“path”:”/sys/fs/“,”type”:”DirectoryOrCreate”},”name”:”sysfs”},{“hostPath”:{“path”:”/opt/cni/bin”,”type”:””},”name”:”cni-bin-dir”},{“hostPath”:{“path”:”/etc/cni/net.d”,”type”:””},”name”:”cni-net-dir”},{“hostPath”:{“path”:”/var/lib/cni/networks”,”type”:””},”name”:”host-local-net-dir”},{“hostPath”:{“path”:”/var/run/nodeagent”,”type”:”DirectoryOrCreate”},”name”:”policysync”},{“hostPath”:{“path”:”/usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds”,”type”:”DirectoryOrCreate”},”name”:”flexvol-driver-host”}]}},”updateStrategy”:{“rollingUpdate”:{“maxUnavailable”:1},”type”:”RollingUpdate”}},”status”:{“currentNumberScheduled”:7,”desiredNumberScheduled”:7,”numberAvailable”:7,”numberMisscheduled”:0,”numberReady”:7,”observedGeneration”:1,”updatedNumberScheduled”:7}}
managedFields:
- manager: kubectl
operation: Update
apiVersion: apps/v1
time: ‘2020-12-24T02:38:45Z’
fieldsType: FieldsV1
fieldsV1:
‘f:metadata’:
‘f:annotations’:
.: {}
‘f:deprecated.daemonset.template.generation’: {}
‘f:kubectl.kubernetes.io/last-applied-configuration’: {}
‘f:labels’:
.: {}
‘f:k8s-app’: {}
‘f:spec’:
‘f:revisionHistoryLimit’: {}
‘f:selector’:
‘f:matchLabels’:
.: {}
‘f:k8s-app’: {}
‘f:template’:
‘f:metadata’:
‘f:labels’:
.: {}
‘f:k8s-app’: {}
‘f:spec’:
‘f:containers’:
‘k:{“name”:”busybox”}’:
.: {}
‘f:args’: {}
‘f:image’: {}
‘f:imagePullPolicy’: {}
‘f:name’: {}
‘f:readinessProbe’:
.: {}
‘f:exec’:
.: {}
‘f:command’: {}
‘f:failureThreshold’: {}
‘f:initialDelaySeconds’: {}
‘f:periodSeconds’: {}
‘f:successThreshold’: {}
‘f:timeoutSeconds’: {}
‘f:resources’: {}
‘f:terminationMessagePath’: {}
‘f:terminationMessagePolicy’: {}
‘k:{“name”:”calico-node”}’:
.: {}
‘f:env’:
.: {}
‘k:{“name”:”CALICO_DISABLE_FILE_LOGGING”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”CALICO_IPV4POOL_IPIP”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”CALICO_IPV4POOL_VXLAN”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”CALICO_NETWORKING_BACKEND”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”CLUSTER_TYPE”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”DATASTORE_TYPE”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_DEFAULTENDPOINTTOHOSTACTION”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_DISABLECONNTRACKINVALIDCHECK”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_HEALTHENABLED”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_IPINIPMTU”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”FELIX_IPV6SUPPORT”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_LOGSEVERITYSCREEN”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_PROMETHEUSMETRICSENABLED”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_TYPHAK8SSERVICENAME”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”FELIX_VXLANMTU”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”FELIX_WIREGUARDMTU”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”IP”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”NODENAME”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:fieldRef’:
.: {}
‘f:apiVersion’: {}
‘f:fieldPath’: {}
‘k:{“name”:”WAIT_FOR_DATASTORE”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘f:envFrom’: {}
‘f:image’: {}
‘f:imagePullPolicy’: {}
‘f:livenessProbe’:
.: {}
‘f:exec’:
.: {}
‘f:command’: {}
‘f:failureThreshold’: {}
‘f:initialDelaySeconds’: {}
‘f:periodSeconds’: {}
‘f:successThreshold’: {}
‘f:timeoutSeconds’: {}
‘f:name’: {}
‘f:readinessProbe’:
.: {}
‘f:exec’:
.: {}
‘f:command’: {}
‘f:failureThreshold’: {}
‘f:periodSeconds’: {}
‘f:successThreshold’: {}
‘f:timeoutSeconds’: {}
‘f:resources’:
.: {}
‘f:requests’:
.: {}
‘f:cpu’: {}
‘f:securityContext’:
.: {}
‘f:privileged’: {}
‘f:terminationMessagePath’: {}
‘f:terminationMessagePolicy’: {}
‘f:volumeMounts’:
.: {}
‘k:{“mountPath”:”/lib/modules”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘f:readOnly’: {}
‘k:{“mountPath”:”/run/xtables.lock”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“mountPath”:”/var/lib/calico”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“mountPath”:”/var/run/calico”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“mountPath”:”/var/run/nodeagent”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘f:dnsPolicy’: {}
‘f:hostNetwork’: {}
‘f:initContainers’:
.: {}
‘k:{“name”:”flexvol-driver”}’:
.: {}
‘f:image’: {}
‘f:imagePullPolicy’: {}
‘f:name’: {}
‘f:resources’: {}
‘f:securityContext’:
.: {}
‘f:privileged’: {}
‘f:terminationMessagePath’: {}
‘f:terminationMessagePolicy’: {}
‘f:volumeMounts’:
.: {}
‘k:{“mountPath”:”/host/driver”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“name”:”install-cni”}’:
.: {}
‘f:command’: {}
‘f:env’:
.: {}
‘k:{“name”:”CNI_CONF_NAME”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘k:{“name”:”CNI_MTU”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”CNI_NETWORK_CONFIG”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”KUBERNETES_NODE_NAME”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:fieldRef’:
.: {}
‘f:apiVersion’: {}
‘f:fieldPath’: {}
‘k:{“name”:”SLEEP”}’:
.: {}
‘f:name’: {}
‘f:value’: {}
‘f:envFrom’: {}
‘f:image’: {}
‘f:imagePullPolicy’: {}
‘f:name’: {}
‘f:resources’: {}
‘f:securityContext’:
.: {}
‘f:privileged’: {}
‘f:terminationMessagePath’: {}
‘f:terminationMessagePolicy’: {}
‘f:volumeMounts’:
.: {}
‘k:{“mountPath”:”/host/etc/cni/net.d”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“mountPath”:”/host/opt/cni/bin”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“name”:”upgrade-ipam”}’:
.: {}
‘f:command’: {}
‘f:env’:
.: {}
‘k:{“name”:”CALICO_NETWORKING_BACKEND”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:configMapKeyRef’:
.: {}
‘f:key’: {}
‘f:name’: {}
‘k:{“name”:”KUBERNETES_NODE_NAME”}’:
.: {}
‘f:name’: {}
‘f:valueFrom’:
.: {}
‘f:fieldRef’:
.: {}
‘f:apiVersion’: {}
‘f:fieldPath’: {}
‘f:envFrom’: {}
‘f:image’: {}
‘f:imagePullPolicy’: {}
‘f:name’: {}
‘f:resources’: {}
‘f:securityContext’:
.: {}
‘f:privileged’: {}
‘f:terminationMessagePath’: {}
‘f:terminationMessagePolicy’: {}
‘f:volumeMounts’:
.: {}
‘k:{“mountPath”:”/host/opt/cni/bin”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘k:{“mountPath”:”/var/lib/cni/networks”}’:
.: {}
‘f:mountPath’: {}
‘f:name’: {}
‘f:nodeSelector’:
.: {}
‘f:kubernetes.io/os’: {}
‘f:priorityClassName’: {}
‘f:restartPolicy’: {}
‘f:schedulerName’: {}
‘f:securityContext’: {}
‘f:serviceAccount’: {}
‘f:serviceAccountName’: {}
‘f:terminationGracePeriodSeconds’: {}
‘f:tolerations’: {}
‘f:volumes’:
.: {}
‘k:{“name”:”cni-bin-dir”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”cni-net-dir”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”flexvol-driver-host”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”host-local-net-dir”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”lib-modules”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”policysync”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”sysfs”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”var-lib-calico”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”var-run-calico”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘k:{“name”:”xtables-lock”}’:
.: {}
‘f:hostPath’:
.: {}
‘f:path’: {}
‘f:type’: {}
‘f:name’: {}
‘f:updateStrategy’:
‘f:rollingUpdate’:
.: {}
‘f:maxUnavailable’: {}
‘f:type’: {}
- manager: kube-controller-manager
operation: Update
apiVersion: apps/v1
time: ‘2020-12-25T21:18:45Z’
fieldsType: FieldsV1
fieldsV1:
‘f:status’:
‘f:currentNumberScheduled’: {}
‘f:desiredNumberScheduled’: {}
‘f:numberAvailable’: {}
‘f:numberReady’: {}
‘f:observedGeneration’: {}
‘f:updatedNumberScheduled’: {}
spec:
selector:
matchLabels:
k8s-app: calico-node
template:
metadata:
creationTimestamp: null
labels:
k8s-app: calico-node
spec:
volumes:
- name: lib-modules
hostPath:
path: /lib/modules
type: ‘’
- name: var-run-calico
hostPath:
path: /var/run/calico
type: ‘’
- name: var-lib-calico
hostPath:
path: /var/lib/calico
type: ‘’
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
- name: sysfs
hostPath:
path: /sys/fs/
type: DirectoryOrCreate
- name: cni-bin-dir
hostPath:
path: /opt/cni/bin
type: ‘’
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d
type: ‘’
- name: host-local-net-dir
hostPath:
path: /var/lib/cni/networks
type: ‘’
- name: policysync
hostPath:
path: /var/run/nodeagent
type: DirectoryOrCreate
- name: flexvol-driver-host
hostPath:
path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
type: DirectoryOrCreate
initContainers:
- name: upgrade-ipam
image: ‘docker-ecr001.rnd.gic.ericsson.se/calico/cni:v3.16.5’
command:
- /opt/cni/bin/calico-ipam
- ‘-upgrade’
envFrom:
- configMapRef:
name: kubernetes-services-endpoint
optional: true
env:
- name: KUBERNETES_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: CALICO_NETWORKING_BACKEND
valueFrom:
configMapKeyRef:
name: calico-config
key: calico_backend
resources: {}
volumeMounts:
- name: host-local-net-dir
mountPath: /var/lib/cni/networks
- name: cni-bin-dir
mountPath: /host/opt/cni/bin
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
- name: install-cni
image: ‘docker-ecr001.rnd.gic.ericsson.se/calico/cni:v3.16.5’
command:
- /opt/cni/bin/install
envFrom:
- configMapRef:
name: kubernetes-services-endpoint
optional: true
env:
- name: CNI_CONF_NAME
value: 10-calico.conflist
- name: CNI_NETWORK_CONFIG
valueFrom:
configMapKeyRef:
name: calico-config
key: cni_network_config
- name: KUBERNETES_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: CNI_MTU
valueFrom:
configMapKeyRef:
name: calico-config
key: veth_mtu
- name: SLEEP
value: ‘false’
resources: {}
volumeMounts:
- name: cni-bin-dir
mountPath: /host/opt/cni/bin
- name: cni-net-dir
mountPath: /host/etc/cni/net.d
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
- name: flexvol-driver
image: ‘docker-ecr001.rnd.gic.ericsson.se/calico/pod2daemon-flexvol:v3.16.5’
resources: {}
volumeMounts:
- name: flexvol-driver-host
mountPath: /host/driver
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
containers:
- name: busybox
image: ‘busybox:1.28’
args:
- /bin/sh
- ‘-c’
- sleep 10; touch /tmp/healthy; sleep 30000
resources: {}
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
- name: calico-node
image: ‘docker-ecr001.rnd.gic.ericsson.se/calico/node:v3.16.5’
envFrom:
- configMapRef:
name: kubernetes-services-endpoint
optional: true
env:
- name: DATASTORE_TYPE
value: kubernetes
- name: FELIX_TYPHAK8SSERVICENAME
valueFrom:
configMapKeyRef:
name: calico-config
key: typha_service_name
- name: WAIT_FOR_DATASTORE
value: ‘true’
- name: NODENAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: CALICO_NETWORKING_BACKEND
valueFrom:
configMapKeyRef:
name: calico-config
key: calico_backend
- name: CLUSTER_TYPE
value: ‘k8s,bgp’
- name: IP
value: autodetect
- name: CALICO_IPV4POOL_IPIP
value: Never
- name: CALICO_IPV4POOL_VXLAN
value: CrossSubnet
- name: FELIX_IPINIPMTU
valueFrom:
configMapKeyRef:
name: calico-config
key: veth_mtu
- name: FELIX_VXLANMTU
value: ‘1450’
- name: FELIX_WIREGUARDMTU
valueFrom:
configMapKeyRef:
name: calico-config
key: veth_mtu
- name: CALICO_DISABLE_FILE_LOGGING
value: ‘true’
- name: FELIX_DEFAULTENDPOINTTOHOSTACTION
value: ACCEPT
- name: FELIX_IPV6SUPPORT
value: ‘false’
- name: FELIX_LOGSEVERITYSCREEN
value: info
- name: FELIX_HEALTHENABLED
value: ‘true’
- name: FELIX_PROMETHEUSMETRICSENABLED
value: ‘true’
- name: FELIX_DISABLECONNTRACKINVALIDCHECK
value: ‘true’
resources:
requests:
cpu: 250m
volumeMounts:
- name: lib-modules
readOnly: true
mountPath: /lib/modules
- name: xtables-lock
mountPath: /run/xtables.lock
- name: var-run-calico
mountPath: /var/run/calico
- name: var-lib-calico
mountPath: /var/lib/calico
- name: policysync
mountPath: /var/run/nodeagent
livenessProbe:
exec:
command:
- /bin/calico-node
- ‘-felix-live’
- ‘-bird-live’
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 6
readinessProbe:
exec:
command:
- /bin/calico-node
- ‘-felix-ready’
- ‘-bird-ready’
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
restartPolicy: Always
terminationGracePeriodSeconds: 0
dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: calico-node
serviceAccount: calico-node
hostNetwork: true
securityContext: {}
schedulerName: default-scheduler
tolerations:
- operator: Exists
effect: NoSchedule
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
priorityClassName: system-node-critical
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
revisionHistoryLimit: 10
status:
currentNumberScheduled: 7
numberMisscheduled: 0
desiredNumberScheduled: 7
numberReady: 7
observedGeneration: 2
updatedNumberScheduled: 7
numberAvailable: 7
3) kubectl apply -f calico_node_daemonset_vi.yaml
4) 效果
可以去busybox 里 做尝试各种实验
遗留问题, busybox 容器里怎么安装 工具?没有 apk,没有 curl