minikube && k8s 命令

燕山督云侠發表於2024-08-16

minikube docker-env
minikube dashboard
minikube ssh

匯出一個已經建立的容器導到一個檔案

docker export -o 檔名.tar 容器id

將檔案匯入為映象

docker import 檔名.tar 映象名:映象標籤

本地映象關聯到minikube

minikube "docker-env"

將容器儲存為映象:

docker commit <容器ID或名稱> <映象名稱>:<標籤>
docker commit abc123 my_image:latest

docker exec -it eb1e292314f837d355ad6cc3832c0831571de18c33ff95b8f9948b56d2c0034e bash

推送映象

docker tag oryd/keto:v0.12.0-alpha.0 git2.yunbosoft.com:5050/caenativecloud/registry/keto:v0.12.0-alpha.0
docker push git2.yunbosoft.com:5050/caenativecloud/registry/keto:v0.12.0-alpha.0

docker tag openfoam:v3 git2.yunbosoft.com:5050/caenativecloud/registry/openfoam:v0.11.3
docker push git2.yunbosoft.com:5050/caenativecloud/registry/openfoam:v0.11.3

將本地檔案複製到minikube

minikube cp C:\a.txt /home/docker/a.txt

將minikube複製到本地

minikube cp minikube:/home/docker/a.txt C:\bbb.txt

minikube cp openform11.base.tar /home/docker/openform11.base.tar

清理映象

docker system df
docker image prune
docker builder prune
docker system prune

相關文章