[k8s]centos测试yaml
centos-podapiVersion: v1kind: Podmetadata:name: my-centoslabels:app: centosspec:containers:- name: my-centosimage: centos:6.8imagePullPolicy: IfNotPresentcommand: ["t
·
centos-pod
apiVersion: v1
kind: Pod
metadata:
name: my-centos
labels:
app: centos
spec:
containers:
- name: my-centos
image: centos:6.8
imagePullPolicy: IfNotPresent
command: ["top","-b"]
centos-rc
$ cat centos-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: rc-centos
spec:
replicas: 1
selector:
app: centos
template:
metadata:
labels:
app: centos
spec:
containers:
- name: app-centos
image: centos:6.8
imagePullPolicy: IfNotPresent
command: ["top","-b"]
centos-deploy
$ cat centos-deploy.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: deploy-centos
spec:
replicas: 1
selector:
matchLabels:
app: centos
template:
metadata:
labels:
app: centos
spec:
containers:
- name: app-centos
image: centos
imagePullPolicy: IfNotPresent
command: ["top", "-b"]
更多推荐
已为社区贡献21条内容
所有评论(0)