root@ubuntu-server:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE public.ecr.aws/eks-anywhere/mrajashree/etcdadm-bootstrap-provider v0.1.0-beta-4.1-eks-a-1 fdf90a12059b 13 days ago 39.5MB public.ecr.aws/eks-anywhere/mrajashree/etcdadm-controller v0.1.0-beta-4.1-eks-a-1 1df9b1e09c08 13 days ago 44.2MB public.ecr.aws/eks-anywhere/cli-tools v0.1.0-eks-a-1 ab7c32596071 13 days ago 390MB public.ecr.aws/eks-anywhere/kubernetes-sigs/kind/node v1.21.2-eks-d-1-21-4-eks-a-1 e786b2049245 13 days ago 1.64GB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api-provider-aws/cluster-api-aws-controller v0.6.4-eks-a-1 f19480314c0c 13 days ago 65.2MB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api/capd-manager v0.3.23-eks-a-1 9551d1a8c5e4 13 days ago 228MB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api/kubeadm-control-plane-controller v0.3.23-eks-a-1 9e78bc6ef020 13 days ago 62.1MB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api/kubeadm-bootstrap-controller v0.3.23-eks-a-1 c74f411ef1c2 13 days ago 56.4MB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api/cluster-api-controller v0.3.23-eks-a-1 8cc018325da7 13 days ago 57.4MB public.ecr.aws/eks-anywhere/jetstack/cert-manager-webhook v1.1.0-eks-a-1 ff993602e2ca 13 days ago 42.4MB public.ecr.aws/eks-anywhere/jetstack/cert-manager-controller v1.1.0-eks-a-1 07ed0e004245 13 days ago 52.8MB public.ecr.aws/eks-anywhere/jetstack/cert-manager-cainjector v1.1.0-eks-a-1 3e6a2a6e0bd3 13 days ago 40.8MB public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api-provider-vsphere/release/manager v0.7.10-eks-a-1 a11c8cf5aa7f 13 days ago 55.4MB public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy v0.8.0-eks-a-1 f35c58b91b9c 13 days ago 41.7MB kindest/haproxy v20210715-a6da3463 083ad526a17e 2 months ago 31.8MB hello-world latest d1165f221234 6 months ago 13.3kB
docker pull public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy:v0.8.0-eks-a-1 #org one is v0.4.1 docker pull public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api-provider-vsphere/release/manager:v0.7.10-eks-a-1
docker pull public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy:v0.8.0-eks-a-1 #org one is v0.8.0 docker pull public.ecr.aws/eks-anywhere/kubernetes-sigs/cluster-api/capd-manager:v0.3.23-eks-a-1
docker pull public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy:v0.8.0-eks-a-1 #org one is v0.4.0 docker pull public.ecr.aws/eks-anywhere/mrajashree/etcdadm-bootstrap-provider:v0.1.0-beta-4.1-eks-a-1
docker pull public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy:v0.8.0-eks-a-1 #org one is v0.4.0 docker pull public.ecr.aws/eks-anywhere/mrajashree/etcdadm-controller:v0.1.0-beta-4.1-eks-a-1 docker pull public.ecr.aws/eks-anywhere/brancz/kube-rbac-proxy:v0.8.0-eks-a-1 #org one is v0.4.0
❯ ~ ··· at 14:51:27 ❯ eksctl anywhere create cluster -f $CLUSTER_NAME.yaml -v 5 Performing setup and validations Warning: The docker infrastructure provider is meant forlocal development and testing only ✅ Docker Provider setup is valid Creating new bootstrap cluster Installing cluster-api providers on bootstrap cluster Provider specific setup Creating new workload cluster Installing networking on workload cluster Installing storage class on workload cluster Installing cluster-api providers on workload cluster Moving cluster management from bootstrap to workload cluster Installing EKS-A custom components (CRD and controller) on workload cluster Creating EKS-A CRDs instances on workload cluster Installing AddonManager and GitOps Toolkit on workload cluster GitOps field not specified, bootstrap flux skipped Writing cluster config file Deleting bootstrap cluster 🎉 Cluster created!
root@ubuntu-server:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 66edc1f9a3d9 public.ecr.aws/eks-anywhere/cli-tools:v0.1.0-eks-a-1 "clusterctl init --c…" 38 seconds ago Up 37 seconds serene_hopper 57932fdcc915 public..../node:v1.21.2-eks-d-1-21-4-eks-a-1 "/usr/local/bin/entr…" About a minute ago Up About a minute 127.0.0.1:42309->6443/tcp dev-cluster-eks-a-cluster-control-plane
root@ubuntu-server:~# docker logs -f serene_hopper Fetching providers Using Override="core-components.yaml" Provider="cluster-api" Version="v0.3.23" Using Override="bootstrap-components.yaml" Provider="bootstrap-kubeadm" Version="v0.3.23" Using Override="bootstrap-components.yaml" Provider="bootstrap-etcdadm-bootstrap" Version="v0.1.0-beta-4.1" Using Override="bootstrap-components.yaml" Provider="bootstrap-etcdadm-controller" Version="v0.1.0-beta-4.1" Using Override="control-plane-components.yaml" Provider="control-plane-kubeadm" Version="v0.3.23" Using Override="infrastructure-components-development.yaml" Provider="infrastructure-docker" Version="v0.3.23" Installing cert-manager Version="v1.1.0" Waiting for cert-manager to be available... Installing Provider="cluster-api" Version="v0.3.23" TargetNamespace="capi-system" Installing Provider="bootstrap-kubeadm" Version="v0.3.23" TargetNamespace="capi-kubeadm-bootstrap-system" Installing Provider="bootstrap-etcdadm-bootstrap" Version="v0.1.0-beta-4.1" TargetNamespace="etcdadm-bootstrap-provider-system" Installing Provider="bootstrap-etcdadm-controller" Version="v0.1.0-beta-4.1" TargetNamespace="etcdadm-controller-system" Installing Provider="control-plane-kubeadm" Version="v0.3.23" TargetNamespace="capi-kubeadm-control-plane-system" Installing Provider="infrastructure-docker" Version="v0.3.23" TargetNamespace="capd-system"
Your management cluster has been initialized successfully!
You can now create your first workload cluster by running the following:
root@ubuntu-server:~# docker logs ricklab-cluster-etcd-cjvzj INFO: ensuring we can execute mount/umount even with userns-remap INFO: remounting /sys read-only INFO: making mounts shared INFO: detected cgroup v1 INFO: fix cgroup mounts for all subsystems INFO: clearing and regenerating /etc/machine-id Initializing machine ID from random generator. INFO: faking /sys/class/dmi/id/product_name to be "kind" INFO: faking /sys/class/dmi/id/product_uuid to be random INFO: faking /sys/devices/virtual/dmi/id/product_uuid as well INFO: setting iptables to detected mode: legacy INFO: Detected IPv4 address: 172.18.0.4 INFO: Detected IPv6 address: fc00:f853:ccd:e793::4
Welcome to Amazon Linux 2!
[ OK ] Set up automount Arbitrary Executab...ats File System Automount Point. [ OK ] Reached target Local File Systems. [ OK ] Reached target Swap. [ OK ] Started Dispatch Password Requests to Console Directory Watch. [ OK ] Reached target Paths. [ OK ] Created slice Root Slice.
... 略 ...
Starting Create Static Device Nodes in /dev... Starting Flush Journal to Persistent Storage... [ OK ] Started Create Static Device Nodes in /dev. [ OK ] Started Update UTMP about System Boot/Shutdown. [ OK ] Started Flush Journal to Persistent Storage. [ OK ] Started Rebuild Hardware Database. Starting Update is Completed... [ OK ] Started Update is Completed. [ OK ] Reached target System Initialization. [ OK ] Started Daily Cleanup of Temporary Directories. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting containerd container runtime... Starting Cleanup of Temporary Directories... [ OK ] Started Cleanup of Temporary Directories. [ OK ] Started containerd container runtime. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes.
最後觀察 docker ps 建立那一些 container:
1 2 3 4 5 6 7
root@ubuntu-server:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2e432b89f3f8 public.ecr.aws/eks-anywhere/kubernetes-sigs/kind/node:v1.21.2-eks-d-1-21-4-eks-a-1 "/usr/local/bin/entr…" 13 minutes ago Up 13 minutes ricklab-cluster-md-0-76b7b5578c-zhs7d d0e7ac20a689 public.ecr.aws/eks-anywhere/kubernetes-sigs/kind/node:v1.21.2-eks-d-1-21-4-eks-a-1 "/usr/local/bin/entr…" 14 minutes ago Up 14 minutes 34917/tcp, 127.0.0.1:34917->6443/tcp ricklab-cluster-4n42d a18287b7d33d public.ecr.aws/eks-anywhere/kubernetes-sigs/kind/node:v1.21.2-eks-d-1-21-4-eks-a-1 "/usr/local/bin/entr…" 14 minutes ago Up 14 minutes ricklab-cluster-etcd-cjvzj 7c95c9a2a15a kindest/haproxy:v20210715-a6da3463 "haproxy -sf 7 -W -d…" 14 minutes ago Up 14 minutes 45713/tcp, 0.0.0.0:45713->6443/tcp ricklab-cluster-lb root@ubuntu-server:~#
# 取得 componentstatus (cs) root@ubuntu-server:~# kubectl get cs Warning: v1 ComponentStatus is deprecated in v1.19+ NAME STATUS MESSAGE ERROR scheduler Unhealthy Get "http://127.0.0.1:10251/healthz": dial tcp 127.0.0.1:10251: connect: connection refused controller-manager Unhealthy Get "http://127.0.0.1:10252/healthz": dial tcp 127.0.0.1:10252: connect: connection refused etcd-0 Healthy {"health":"true"}
## 如果狀態跟上面一樣有問題,請參閱這份文件調整: https://my.oschina.net/u/1431757/blog/4550843 ## 正常如下: root@ubuntu-server:~# kubectl get cs Warning: v1 ComponentStatus is deprecated in v1.19+ NAME STATUS MESSAGE ERROR controller-manager Healthy ok etcd-0 Healthy {"health":"true"} scheduler Healthy ok
# 取的 api-resources root@ubuntu-server:~# kubectl api-resources NAME SHORTNAMES APIVERSION NAMESPACED KIND bindings v1 true Binding componentstatuses cs v1 false ComponentStatus configmaps cm v1 true ConfigMap endpoints ep v1 true Endpoints
# 取得目前的 namespaces root@ubuntu-server:~# kubectl get ns NAME STATUS AGE capd-system Active 17m capi-kubeadm-bootstrap-system Active 17m capi-kubeadm-control-plane-system Active 17m capi-system Active 17m capi-webhook-system Active 17m cert-manager Active 18m default Active 19m eksa-system Active 16m etcdadm-bootstrap-provider-system Active 17m etcdadm-controller-system Active 17m kube-node-lease Active 19m kube-public Active 19m kube-system Active 19m root@ubuntu-server:~#
# 取得目前的 nodes 狀態 root@ubuntu-server:~# kubectl get node -o wide NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME ricklab-cluster-4n42d Ready control-plane,master 17m v1.21.2-eks-1-21-4 172.18.0.5 <none> Amazon Linux 2 5.4.0-84-generic containerd://1.4.6 ricklab-cluster-md-0-76b7b5578c-zhs7d Ready <none> 16m v1.21.2-eks-1-21-4 172.18.0.6 <none> Amazon Linux 2 5.4.0-84-generic containerd://1.4.6 root@ubuntu-server:~#