K8S测试pod

背景

用于测试ping,curl等类型的pod

Centos pod

apiVersion: apps/v1
kind: Deployment
metadata:
  name: centos-deployment
  labels:
    app: centos
spec:
  replicas: 1
  selector:
    matchLabels:
      app: centos
  template:
    metadata:
      labels:
        app: centos
    spec:
      containers:
      - name: centos
        image: centos:7
        imagePullPolicy: IfNotPresent
        command: ["/bin/sh","-ce","tail -f /dev/null"]

        ports:
        - containerPort: 22

你可能感兴趣的:(Kubernetes,kubernetes,linux,容器)