[k8s]centos测试yaml

来源:互联网 发布:sql修改表结构的命令 编辑:程序博客网 时间:2024/06/05 05:37

centos-pod

apiVersion: v1kind: Podmetadata:  name: my-centos  labels:    app: centosspec:  containers:  - name: my-centos    image: centos:6.8    imagePullPolicy: IfNotPresent    command: ["top","-b"]

centos-rc

$ cat centos-rc.yaml apiVersion: v1kind: ReplicationControllermetadata:  name: rc-centosspec:  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/v1beta1kind: Deploymentmetadata:  name: deploy-centosspec:  replicas: 1  selector:    matchLabels:      app: centos  template:    metadata:      labels:        app: centos    spec:      containers:      - name: app-centos        image: centos        imagePullPolicy: IfNotPresent          command: ["top", "-b"]