April 2018
Intermediate to advanced
468 pages
14h 34m
English
kubectl can create an autoscale resource using the standard create command and accepting a configuration file. But kubectl also has a special command, autoscale, that lets you easily set an autoscaler in one command without a special configuration file:
apiVersion: v1
kind: ReplicationController
metadata:
name: bash-loop-rc
spec:
replicas: 3
template:
metadata:
labels:
name: bash-loop-rc
spec:
containers:
- name: bash-loop
image: ubuntu
command: ["/bin/bash", "-c", "while true; do sleep 10;
done"]
> kubectl create -f bash-loop-rc.yaml ...
Read now
Unlock full access