docker exect -it myimage /bin/bash
docker build --tag myimage:tag_name .
docker container attach myimage
docker run -itd --name <name> --network <network> --publish 80:8080 myimage:tag
docker image tag myimage myrepo/myimage:tag
docker image push myrepo/myimage:tag
Last active
October 2, 2023 18:40
-
-
Save darksinge/557dc2a292826a6bae76348984ceb3e7 to your computer and use it in GitHub Desktop.
Kubernetes Cheat Sheet (and minikube, docker, kubectl, eksctl, and AWS ECR)
minikube start
eval $(minikube docker-env)
docker build ...
kubectl run myimage --image myimage:latest --image-pull-policy=Never
kubectl get pods
minikube delete
$ kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}')
$ kubectl port-forward svc/kubernetes-dashboard -n kube-system 6443:443
aws eks --region <region> update-kubeconfig --name <service_name>
kubectl config view
aws ecr get-login-password --region <region> | docker login --usernmae AWS -- password-stdin <account_id>.dkr.ecr.<region>.amazonaws.com/myrepository
kubectl create secret <secret_name>
$ echo -n sekure_value | kubectl create secret generic mysecret --dry-run --from-file=mysecret=/dev/stdin -o json > mysecret.json
$ kubeseal <mysecret.json >mysealedsecret.json
$ kubectl apply -f ./mysealedsecret.json
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment