k8s记录-docker导入导出改标签
Posted xinfang520
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了k8s记录-docker导入导出改标签相关的知识,希望对你有一定的参考价值。
docker save <repository>:<tag> -o <repository>.tar
docker save mysql:latest -o mysql.tar
docker load < mysql.tar
docker-compose -f mysql-deploy.yml up/down
apiVersion: v1 kind: ReplicationController metadata: name: mysql-rc labels: name: mysql-rc spec: replicas: 1 selector: name: mysql-pod template: metadata: labels: name: mysql-pod spec: containers: - name: mysql image: mysql imagePullPolicy: IfNotPresent ports: - containerPort: 3306 env: - name: MYSQL_ROOT_PASSWORD value: "mysql" --- apiVersion: v1 kind: Service metadata: name: mysql-svc labels: name: mysql-svc spec: type: NodePort ports: - port: 3306 protocol: TCP targetPort: 3306 name: http nodePort: 33306 selector: name: mysql-pod
以上是关于k8s记录-docker导入导出改标签的主要内容,如果未能解决你的问题,请参考以下文章