简单使用了hostPath,去做一些目录以及二进制的映射
apiVersion: v1 kind: Pod metadata: name: health-check labels: app: health-check spec: nodeName: k8s-master01 containers: - name: check-status image: xxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxx imagePullPolicy: IfNotPresent #command: ["bash","/root/health-check/main.sh"] volumeMounts: - mountPath: /root/.kube/config name: kubeconfig - mountPath: /usr/bin/kubectl name: kubectl-procedure - mountPath: /usr/bin/etcdctl name: etcdctl-procedure - mountPath: /etc/ssl/etcd/ssl/ name: etcd-certs-dir volumes: - name: kubeconfig hostPath: path: /etc/kubernetes/admin.conf type: File - name: kubectl-procedure hostPath: path: /usr/local/bin/kubectl type: File - name: etcdctl-procedure hostPath: path: /usr/local/bin/etcdctl type: File - name: etcd-certs-dir hostPath: path: /etc/ssl/etcd/ssl/ type: Directory
标签:bin,kubectl,name,简单,hostPath,usr,使用,check From: https://www.cnblogs.com/gsda/p/17165185.html