Created
October 18, 2023 18:56
-
-
Save chadmcrowell/ac999796aa59e2d6ba2286b649a0188f to your computer and use it in GitHub Desktop.
Dallas Kubernetes Workshop - Warmup
This file contains 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
# perform the commands from the following site: | |
# https://studyk8s.club/cka-warmup | |
# list all the api resources | |
k api-resources | |
# help menu is your friend | |
k -h | |
# help menu goes many levels deep | |
k config -h | |
# get your current context | |
k config get-contexts | |
# list the status of the kubelet service | |
systemctl status kubelet | |
# show namespaces | |
k get ns | |
# create a namespace | |
k create ns cka | |
# list the pods in the kube-system namespace | |
k -n kube-system get po | |
# typing the namespace first will help with autocomplete | |
k -n kube-system get po kube-{press-tab-to-autocomplete-the-pod-name} -o yaml | |
# create a pod YAML file with --dry-run=client | |
k run nginx --image nginx --dry-run=client -o yaml > pod.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment