Basic commands:
docker ps
list all currently running containersdocker-compose build
build a series of containers based on a docker-compose filedocker-compose build %APP_NAME%
only build a specific app or service from a docker-compose filedocker-compose up
stand up a series of containers based on a docker-compose filedocker-compose up %APP_NAME%
only stand up and run a specific service from a docker-compose file
I use these commands when I modify a docker-compose file and do not see the changes being applied:
docker-compose build --no-cache
use a fresh image and not a locally cached imagedocker-compose up --force-recreate
recreate containers
A good alias candidate for recreating containers:
docker-compose down && docker-compose build --no-cache && docker-compose up
Basic Kubernetes commands:
kubectl get po
list all podskubectl get po -l app=NAME
list all pods with a certain namekubectl describe po NAME
describe a podkubectl delete po NAME
delete a specific podkubectl describe describe deployment NAME
describe an entire deployment (i.e. a collection of pods)kubectl edit deployment NAME
edit a current deployment (this should open vi or default editor)kubectl logs NAME
get logs from a specific pod