创建一个基础的Centos的镜像yaml文件

创建一个基础的Centos的镜像yaml文件

vim Centos.yml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: centos
  namespace: tax-uat
  labels:
    app: centos
spec:
  replicas: 1
  selector:
    matchLabels:
      app: centos
  template:
    metadata:
      labels:
        app: centos
    spec:
      containers:
      - name: centos
        image: centos
        command: [ "/bin/bash", "-c", "--" ]
        args: [ "while true; do sleep 30; done;" ]
        resources:
          limits:
            cpu: "2"
            memory: "3Gi"
          requests:
            cpu: "1"
            memory: "1Gi"

你可能感兴趣的:(kubernetes,centos,linux,服务器)