This build an image base on a Dockerfile and assign a tag to it and a version number
docker build -t custom/tag:0.0.1 .
Create and start a container based on the provided image id or tag
docker run [image id or image tag]
Create and start container, but also override the default command
docker run -it [image id or image tag] [cmd]
Print out information about all of the running containers
docker ps
Execute the given command in a running container
docker exec -it [container id] [cmd]
Print out logs from the given container
docker logs [container id]
Fetchs all the running pods
within a cluster
kubectl get pods
This create a pod base on a YML config file
kubectl apply -f posts.yml
Print out information about all of the running pods
kupecti get pods
Execute the given command in a running pod
kubectl exec -it [pod_name] [cmd]
Print out logs from the given pod
kubectl logs [pod_ name]
Deletes the given pod
kubecti delete pod [pod_name]
Tells kubernetes to process the config
kubecti apply -f [config file name]
Print out some information about the running pod
kubectl describe pod [pod_name]
apiVersion: v1
kind: Pod
metadata:
name: posts
spec:
containers:
- name: posts
image: alexisvt/posts:0.0.1
# somewhere in your zshrc
plugins=(git git-flow history node npm kubectl)
Source: Autocompletion for kubectl and aliases using oh-my-zsh