小非大人说·华为云—快速创建pod(30)
2020-04-02 本文已影响0人
小非大人说
小非大人说·华为云—快速创建pod
前两篇,我们讲过用yaml文件,建立pod,但yaml文件套用格式,耗时耗力,有时候格式不对还要报错,那么今天我们可以不通过yaml,直接创建pod
kubectl run redis-run --image=redis #通过本地redis直接创建1个pod
kubectl run redis-run --image=redis --replicas=2 #创建多个pod #通过设置replicas的值,可以创建多个pod