Created
April 20, 2022 16:20
-
-
Save gengwg/77042f7625716901d1b72f4f2b797d49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# v1.21 | |
$ kind create cluster --image kindest/node:v1.21.1 | |
Creating cluster "kind" ... | |
β’β‘ Ensuring node image (kindest/node:v1.21.1) πΌ ^R[B | |
β Ensuring node image (kindest/node:v1.21.1) πΌ | |
β Preparing nodes π¦ | |
β Writing configuration π | |
β Starting control-plane πΉοΈ | |
β Installing CNI π | |
β Installing StorageClass πΎ | |
Set kubectl context to "kind-kind" | |
You can now use your cluster with: | |
kubectl cluster-info --context kind-kind | |
Not sure what to do next? π Check out https://kind.sigs.k8s.io/docs/user/quick-start/ | |
$ kubectl create ns gengwg | |
namespace/gengwg created | |
$ k apply -f cron.yaml | |
cronjob.batch/example created | |
$ kubens gengwg | |
Context "kind-kind" modified. | |
Active namespace is "gengwg". | |
$ k get cronjob | |
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE | |
example */1 * * * * False 1 5s 42s | |
$ k get po | |
NAME READY STATUS RESTARTS AGE | |
example-27507090-2mqlt 1/1 Running 0 7s | |
$ k describe po example-27507090-2mqlt | |
Name: example-27507090-2mqlt | |
Namespace: gengwg | |
Priority: 0 | |
Node: kind-control-plane/172.18.0.2 | |
Start Time: Tue, 19 Apr 2022 20:30:00 -0700 | |
Labels: controller-uid=87d7f603-2426-4cf5-8f21-dac44a179ef6 | |
job-name=example-27507090 | |
Annotations: <none> | |
Status: Running | |
IP: 10.244.0.5 | |
IPs: | |
IP: 10.244.0.5 | |
Controlled By: Job/example-27507090 | |
Containers: | |
mycontainer: | |
Container ID: containerd://462c660ff00dac8b042b3caab3b036ae5a2143525baeda35966f92a80c8bd2b7 | |
Image: busybox:1.31.1 | |
Image ID: docker.io/library/busybox@sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209 | |
Port: <none> | |
Host Port: <none> | |
Command: | |
sleep | |
10 | |
State: Running | |
Started: Tue, 19 Apr 2022 20:30:04 -0700 | |
Ready: True | |
Restart Count: 0 | |
Environment: <none> | |
Mounts: | |
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-qnf6n (ro) | |
Conditions: | |
Type Status | |
Initialized True | |
Ready True | |
ContainersReady True | |
PodScheduled True | |
Volumes: | |
kube-api-access-qnf6n: | |
Type: Projected (a volume that contains injected data from multiple sources) | |
TokenExpirationSeconds: 3607 | |
ConfigMapName: kube-root-ca.crt | |
ConfigMapOptional: <nil> | |
DownwardAPI: true | |
QoS Class: BestEffort | |
Node-Selectors: <none> | |
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s | |
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s | |
Events: | |
Type Reason Age From Message | |
---- ------ ---- ---- ------- | |
Normal Scheduled 13s default-scheduler Successfully assigned gengwg/example-27507090-2mqlt to kind-control-plane | |
Normal Pulling 13s kubelet Pulling image "busybox:1.31.1" | |
Normal Pulled 9s kubelet Successfully pulled image "busybox:1.31.1" in 3.567864s | |
Normal Created 9s kubelet Created container mycontainer | |
Normal Started 9s kubelet Started container mycontainer | |
$ k get po | |
NAME READY STATUS RESTARTS AGE | |
example-27507090-2mqlt 0/1 Completed 0 88s | |
example-27507091-xwqqj 0/1 Completed 0 28s | |
$ k describe po example-27507091-xwqqj | |
Name: example-27507091-xwqqj | |
Namespace: gengwg | |
Priority: 0 | |
Node: kind-control-plane/172.18.0.2 | |
Start Time: Tue, 19 Apr 2022 20:31:00 -0700 | |
Labels: controller-uid=bb3687dd-f801-4771-aafb-0c0cae366c1c | |
job-name=example-27507091 | |
Annotations: <none> | |
Status: Succeeded | |
IP: 10.244.0.6 | |
IPs: | |
IP: 10.244.0.6 | |
Controlled By: Job/example-27507091 | |
Containers: | |
mycontainer: | |
Container ID: containerd://be20485cad28eab25d7a89ed7e76f0b7af29cfd888e071bc6ea5878e5110e62f | |
Image: busybox:1.31.1 | |
Image ID: docker.io/library/busybox@sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209 | |
Port: <none> | |
Host Port: <none> | |
Command: | |
sleep | |
10 | |
State: Terminated | |
Reason: Completed | |
Exit Code: 0 | |
Started: Tue, 19 Apr 2022 20:31:01 -0700 | |
Finished: Tue, 19 Apr 2022 20:31:11 -0700 | |
Ready: False | |
Restart Count: 0 | |
Environment: <none> | |
Mounts: | |
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-2fnt7 (ro) | |
Conditions: | |
Type Status | |
Initialized True | |
Ready False | |
ContainersReady False | |
PodScheduled True | |
Volumes: | |
kube-api-access-2fnt7: | |
Type: Projected (a volume that contains injected data from multiple sources) | |
TokenExpirationSeconds: 3607 | |
ConfigMapName: kube-root-ca.crt | |
ConfigMapOptional: <nil> | |
DownwardAPI: true | |
QoS Class: BestEffort | |
Node-Selectors: <none> | |
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s | |
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s | |
Events: | |
Type Reason Age From Message | |
---- ------ ---- ---- ------- | |
Normal Scheduled 37s default-scheduler Successfully assigned gengwg/example-27507091-xwqqj to kind-control-plane | |
Normal Pulling 37s kubelet Pulling image "busybox:1.31.1" | |
Normal Pulled 36s kubelet Successfully pulled image "busybox:1.31.1" in 1.0359544s | |
Normal Created 36s kubelet Created container mycontainer | |
Normal Started 36s kubelet Started container mycontainer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment