Created
April 20, 2022 16:22
-
-
Save gengwg/cb7c155cea6718e91f43b24870e25517 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.23 | |
$ kind create cluster | |
Creating cluster "kind" ... | |
β Ensuring node image (kindest/node:v1.23.4) πΌ | |
β 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 | |
Thanks for using kind! π | |
$ vim cron.yaml | |
$ k apply -f cron.yaml | |
Error from server (NotFound): error when creating "cron.yaml": namespaces "gengwg" not found | |
$ 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 po | |
NAME READY STATUS RESTARTS AGE | |
example-27507083-pswp2 0/1 Completed 0 19s | |
$ k describe po example-27507083-pswp2 | |
Name: example-27507083-pswp2 | |
Namespace: gengwg | |
Priority: 0 | |
Node: kind-control-plane/172.18.0.2 | |
Start Time: Tue, 19 Apr 2022 20:23:00 -0700 | |
Labels: controller-uid=b2b170e1-cddd-432a-aef6-1216ece3f1d9 | |
job-name=example-27507083 | |
Annotations: <none> | |
Status: Succeeded | |
IP: 10.244.0.5 | |
IPs: | |
IP: 10.244.0.5 | |
Controlled By: Job/example-27507083 | |
Containers: | |
mycontainer: | |
Container ID: containerd://cfdeb6321e142acec2d91dbb073d6fb869c48a63baa58d275fd06a9a85079cb0 | |
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:23:04 -0700 | |
Finished: Tue, 19 Apr 2022 20:23:14 -0700 | |
Ready: False | |
Restart Count: 0 | |
Environment: <none> | |
Mounts: | |
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-hvtbm (ro) | |
Conditions: | |
Type Status | |
Initialized True | |
Ready False | |
ContainersReady False | |
PodScheduled True | |
Volumes: | |
kube-api-access-hvtbm: | |
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 27s default-scheduler Successfully assigned gengwg/example-27507083-pswp2 to kind-control-plane | |
Normal Pulling 27s kubelet Pulling image "busybox:1.31.1" | |
Normal Pulled 23s kubelet Successfully pulled image "busybox:1.31.1" in 3.6804456s | |
Normal Created 23s kubelet Created container mycontainer | |
Normal Started 23s kubelet Started container mycontainer | |
Warning FailedMount 12s (x2 over 13s) kubelet MountVolume.SetUp failed for volume "kube-api-access-hvtbm" : object "gengwg"/"kube-root-ca.crt" not registered |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment