知乎专栏 |
root@netkiller ~# kubectl get ns NAME STATUS AGE default Active 197d kube-system Active 197d kube-public Active 197d kube-node-lease Active 197d longhorn-system Active 195d test Active 163d gitlab Active 156d dev Active 155d training Active 133d project Active 24h root@netkiller ~# kubectl get namespace NAME STATUS AGE default Active 197d kube-system Active 197d kube-public Active 197d kube-node-lease Active 197d longhorn-system Active 195d test Active 163d gitlab Active 156d dev Active 155d training Active 133d project Active 24h
创建 jenkins-namespace.yaml
apiVersion: v1 kind: Namespace metadata: name: jenkins-project
$ kubectl create -f jenkins-namespace.yaml namespace ”jenkins-project“ created