生成容器
vim test-for-k8s.yml
apiVersion: v1
kind: Pod
metadata:
name: busybox-curl
labels:
ccb: busybox-curl
spec:
containers:
- name: test-for-k8s
image: yauritux/busybox-curl
command: ["/bin/sh", "-c", "sleep 100000" ]
restartPolicy: Never
使用
k create -f test-for-k8s.yml
k get po
k exec -it busybox-curl /bin/sh