Testando...
Vamos rodar nosso primeiro container no cluster local? O que acha??? Hein???
$ docker run --rm -it centos /bin/bash$ kubectl run tmp-shell --rm -i --tty --image centos -- /bin/bash{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "tmp-shell-exemplo",
"namespace": "default",
"generation": 1,
"labels": {
"run": "tmp-shell-exemplo"
},
"annotations": {
"deployment.kubernetes.io/revision": "1"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"run": "tmp-shell-exemplo"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"run": "tmp-shell-exemplo"
}
},
"spec": {
"containers": [
{
"name": "tmp-shell-exemplo",
"image": "centos",
"args": [
"/bin/bash"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "Always",
"stdin": true,
"tty": true
}
],
"restartPolicy": "Always",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
},
"strategy": {
"type": "RollingUpdate",
"rollingUpdate": {
"maxUnavailable": "25%",
"maxSurge": "25%"
}
},
"revisionHistoryLimit": 2,
"progressDeadlineSeconds": 600
}
}Last updated