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