开始使用 Kubernetes 和 Docker

开始使用 Kubernetes 和 Docker

1. 运行 Hello world 容器

1
2
3
4
5
6
7
$ docker run busybox echo "Hello world"
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
3f4d90098f5b: Pull complete
Digest: sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79
Status: Downloaded newer image for busybox:latest
Hello world

2. 查看集群是否正常工作

1
2
3
4
5
$ kubectl cluster-info 
Kubernetes control plane is running at https://192.168.133.100:6443
CoreDNS is running at https://192.168.133.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

《Kubernetes in action》(二)
http://www.liarsa.me/2023/08/09/KubernetesInAction教程(二)/
Author
Liarsa Shepard
Posted on
August 9, 2023
Licensed under