docker 命令2
docker build -t dvm.adsplatformproxy:v1.0.0 . #build images
docker run -e WWNamespace=dev -e ZKServerAddress=****** -p 6000:80 6cb913a34ae3 #run container,本地起进程
docker run -ti 6cb913a34ae3 /bin/bash #远程进入image文件;exit退出
docker rmi -f b54d6e186ef4 #远程删除image
docker rmi -rf b54d6e186ef4
docker build -t dvm.adsplatformproxy:v1.0.0 . #build images
docker run -e WWNamespace=dev -e ZKServerAddress=****** -p 6000:80 6cb913a34ae3 #run container,本地起进程
docker run -ti 6cb913a34ae3 /bin/bash #远程进入image文件;exit退出
docker rmi -f b54d6e186ef4 #远程删除image
docker rmi -rf b54d6e186ef4
查看docker仓库的tag信息
For the latest (as of 2015-07-31) version of Registry V2, you can get this image from DockerHub:
docker pull distribution/registry:master
List all repositories (effectively images):
curl -X GET https://myregistry:5000/v2/_catalog
> {"repositories":["redis","ubuntu"]}
List all tags for a repository:
curl -X GET https://myregistry:5000/v2/ubuntu/tags/list
> {"name":"ubuntu","tags":["14.04"]}
kubectl get deployment #获取发布
kubectl delete deployment **** #删除发布,自动删除service、pods
kubectl create ******.yaml #创建yaml,包含config、ingress配置
kubectl get ingress #获取ingress配置
kubectl get configmap #获取config配置
kubectl edit configmaps *****-config -n *namespace*
kubectl get configmap #1.获取配置文件
kubectl edit configmap ****** #2.修改配置文件
..\refreshconfig.ps1 -ConfigMapName dvm-website-config #3.psl更新配置 或者删除已有的pod,会自动创建pod并使用新的configmap
kubectl create -f rc-nginx.yaml kubectl replace -f rc-nginx.yaml kubectl edit po rc-nginx-btv4j kubectl delete -f rc-nginx.yaml
kubectl delete po rc-nginx-btv4j
kubectl delete po -lapp=nginx-2 kubectl describe po rc-nginx-2-btv4j # kubectl get namespace
kubectl get po <podname> -o #yaml 以yawl格式输出pod的详细信息。
kubectl get po <podname> -o json # 以json格式输出pod的详细信息。
kubectl get po rc-nginx-2-btv4j -o=custom-columns=LABELS:.metadata.labels.app #使用”-o=custom-columns=“定义直接获取指定内容的值

configmap 的更新
A new command, kubectl rolling-restart that takes an RC name and incrementally deletes all the pods controlled by the RC and allows the RC to recreate them.
Small work around (I use deployments and I want to change configs without having real changes in image/pod):
- create configMap
- create deployment with ENV variable (you will use it as indicator for your deployment) in any container
- update configMap
- update deployment (change this ENV variable)
k8s will see that definition of the deployment has been changed and will start process of replacing pods
PS:
if someone has better solution, please share
It feels like the right solution here would enable you to restart a deployment, and reuse most of the deployment parameters for rollouts like MinReadyCount, while allowing for command-line overrides like increasing the parallelism for emergency situations where you need everything to bounce immediately.
We would also like to see this for deployments maybe like kubectl restart deployment some-api
Kubernetes is allowed to restart Pods for all sorts of reasons, but the cluster admin isn't allowed to.
I understand the moral stand that 'turn it off and on again' may not be a desired way to operate... but I also think it should be ok to let those people who wish to, to restart a Deployment without resorting to the range of less appetizing tricks like:
- deleting pods
- dummy labels
- dummy environment variables
- dummy config maps mapped to environment variable
- rebooting the worker nodes
- cutting the power to the data centre
docker 命令2的更多相关文章
- Docker命令学习
今天更换腾讯云系统的时候发现了多了个CoreOS,据说是专门运行docker的轻量系统,顺便学习一下docker命令. 1. docker version 显示 Docker 版本信息. 2. doc ...
- Docker命令详解
Docker命令详解 最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...
- Docker入门教程(六)另外的15个Docker命令
Docker入门教程(六)另外的15个Docker命令 [编者的话]DockerOne组织翻译了Flux7的Docker入门教程,本文是系列入门教程的第六篇,继续介绍Docker命令.之前的第二篇文章 ...
- 安装Docker和下载images镜像和常用Docker命令
我的是centos7,也会6的方法: $sudo yum install docker 直接yum安装contos7使用centos6.5先获取epel源并 启动Docker,并注册开机服务 [roo ...
- docker命令和后台参数
Docker官方为了让用户快速了解Docker,提供了一个 交互式教程 ,旨在帮助用户掌握Docker命令行的使用方法. Docker 命令行 下面对Docker的命令清单进行简单的介绍,详细内容在后 ...
- 掌握Docker命令
1.管理镜像命令 获取镜像 docker push ubuntu:14:04 查看镜像列表 docker images 重命名image docker tag IMAGE-NAME NEW-IMAGE ...
- docker命令不需要敲sudo的方法
由于docker daemon需要绑定到主机的Unix socket而不是普通的TCP端口,而Unix socket的属主为root用户,所以其他用户只有在命令前添加sudo选项才能执行相关操作. 如 ...
- 从开发到部署会用到的 Docker 命令
本文的目的是理解容器开发在目标环境中部署的端到端流程,并列出这些操作所需的 Docker 命令.如果有任何Docker问题,请移步到最新最热的技术社区 IT帮 itbang.me 提问,短信通知专家来 ...
- docker命令行学习
docker命令行学习 docker run docker run --help:老实说这条最管用了 docker run -it:交互模式,允许控制台输出 docker run -d:detach, ...
- Docker命令查询
基本语法 docker [OPTIONS] COMMAND [arg...] 一般来说,Docker 命令可以用来管理 daemon,或者通过 CLI 命令管理镜像和容器.可以通过 man docke ...
随机推荐
- win7 怎么设置开机直接进入桌面? netplwiz 命令
电脑没设置密码,开机如何跳过帐户已锁定的界面,直接进入桌面呢? 1.单击[运行],或按快捷键:win+r2.输入命令:netplwiz 单击[确定]3.单击你的登录账户4.去掉[要使用本机,用户名必须 ...
- html 基本布局介绍
1.div默认是纵向排列的,例子如下: <div id="wrap"> <div id="div1">div1</div> ...
- brctl 命令详解
安装网桥管理工具包:bridge-utile ```# yum install bridge-utils -y``` ```使用brctl命令创建网桥br1```# brctl addbr br1`` ...
- Linux 进程管理 ps、top、pstree命令
ps命令:查看系统中正在运行的进程 ps 是用来静态地查看系统中正在运行的进程的命令.不过这个命令有些特殊,它的部分选项不能加入"-",比如命令"ps aux" ...
- LNMP的并发配置和资源分配
PHP程序性能如何?程序的并发可以达到多少?程序的瓶颈在哪儿?为了满足业务需求应该购买多少台服务器?负载均衡中php应用服务器需要多少台? LNMP中的N是nginx充当Web Server 内容的分 ...
- flask框架----基于flask的扩展实现的简单的页面登录
废话不多说,直接上代码 from flask import Flask,render_template,request,redirect,session app = Flask(__name__,te ...
- node.js基本使用
1.引入http模块(node的核心模块) const http = require("http"); 2.createServer来创建服务器 http.createServer ...
- 2019/3/26 wen 数组
- percona-server-5.7.18-14安装
说明 percona-server-5.7 的安装对硬件配置的要求较高,至少需要4G内存或者2G物理内存+2Gswap. 编译安装过程中注意所在分区的空间大小,编译安装需要使用到大量的临时空间. 环境 ...
- 如何搭建一个 MySQL 分布式集群
1.准备集群搭建环境 使用6台虚拟机来搭建 MySQL分布式集群 ,相应的实验环境与对应的MySQL节点之间的对应关系如下图所示: 管理节点(MGM):这类节点的作用是管理MySQLCluster内的 ...
- Docker命令学习