Test
Deployment
$ kubectl create deployment nginx --image=nginx
$ kubectl get deployment -o wide
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
nginx 1/1 1 1 4m41s nginx nginx app=nginx
Service
$ kubectl expose deploy nginx --type=NodePort --port 80
service/nginx exposed
$ kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
nginx-5c7588df-ps47g 1/1 Running 0 6m43s 10.32.0.3 worker-1 <none> <none>
$ curl worker-1:32702
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
...
Log
$ kubectl log nginx-5c7588df-ps47g
log is DEPRECATED and will be removed in a future version. Use logs instead.
10.32.0.1 - - [05/Oct/2019:21:19:11 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.58.0" "-"
Exec
$ kubectl exec -it nginx-5c7588df-ps47g -- nginx -v
nginx version: nginx/1.17.4
基本機能は問題なさそう!
