# create namespace
$ kubectl create namespace [namespace-name]
# set namespace to default
$ kubectl config set-context --current --namespace=[namespace-name]
# show nodes
$ kubectl get nodes -o wide
# show pods
$ kubectl get pods
# show services
$ kubectl get svc -o wide
# show configmaps
$ kubectl get configmap
# show pod description
$ kubectl describe pod [pod-name]
# show pod logs
$ kubectl logs [pod-name] --follow
# apply yaml file or folder
$ kubectl apply -f k8s/file.yaml
# destroy yaml file or folder
$ kubectl destroy -f k8s/
# to watch all pods running
$ watch -n1 kubectl get pods
-
Notifications
You must be signed in to change notification settings - Fork 0
deal-machine/k8s
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A repo to register all practices about kubernetes
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published