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的更多相关文章

    1. Docker命令学习

      今天更换腾讯云系统的时候发现了多了个CoreOS,据说是专门运行docker的轻量系统,顺便学习一下docker命令. 1. docker version 显示 Docker 版本信息. 2. doc ...

    2. Docker命令详解

      Docker命令详解   最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...

    3. Docker入门教程(六)另外的15个Docker命令

      Docker入门教程(六)另外的15个Docker命令 [编者的话]DockerOne组织翻译了Flux7的Docker入门教程,本文是系列入门教程的第六篇,继续介绍Docker命令.之前的第二篇文章 ...

    4. 安装Docker和下载images镜像和常用Docker命令

      我的是centos7,也会6的方法: $sudo yum install docker 直接yum安装contos7使用centos6.5先获取epel源并 启动Docker,并注册开机服务 [roo ...

    5. docker命令和后台参数

      Docker官方为了让用户快速了解Docker,提供了一个 交互式教程 ,旨在帮助用户掌握Docker命令行的使用方法. Docker 命令行 下面对Docker的命令清单进行简单的介绍,详细内容在后 ...

    6. 掌握Docker命令

      1.管理镜像命令 获取镜像 docker push ubuntu:14:04 查看镜像列表 docker images 重命名image docker tag IMAGE-NAME NEW-IMAGE ...

    7. docker命令不需要敲sudo的方法

      由于docker daemon需要绑定到主机的Unix socket而不是普通的TCP端口,而Unix socket的属主为root用户,所以其他用户只有在命令前添加sudo选项才能执行相关操作. 如 ...

    8. 从开发到部署会用到的 Docker 命令

      本文的目的是理解容器开发在目标环境中部署的端到端流程,并列出这些操作所需的 Docker 命令.如果有任何Docker问题,请移步到最新最热的技术社区 IT帮 itbang.me 提问,短信通知专家来 ...

    9. docker命令行学习

      docker命令行学习 docker run docker run --help:老实说这条最管用了 docker run -it:交互模式,允许控制台输出 docker run -d:detach, ...

    10. Docker命令查询

      基本语法 docker [OPTIONS] COMMAND [arg...] 一般来说,Docker 命令可以用来管理 daemon,或者通过 CLI 命令管理镜像和容器.可以通过 man docke ...

    随机推荐

    1. MVC中的Ajax与增删改查(二)

      上一篇记录的是前台操作,下面写一下后台 ,本来自认为是没有必要做补充,毕竟思路啥的都有,实际上在做删除操作的时候,折腾了一天,还是自己太嫩,逻辑不够严谨,这里作下记录. 关于表结构这里再作下说明: ① ...

    2. xmldecoder漏洞

      https://blog.csdn.net/youanyyou/article/details/78990312

    3. 设计模式之Flyweight(享元)(转)

      Flyweight定义: 避免大量拥有相同内容的小类的开销(如耗费内存),使大家共享一个类(元类). 为什么使用? 面向对象语言的原则就是一切都是对象,但是如果真正使用起来,有时对象数可能显得很庞大, ...

    4. centos 6.8 配置csh的shell和环境变量

      1.查看shell 查看系统中安装的所有版本的shell:cat   /etc/shells 查看当前用户使用的shell:echo $SHELL 2.修改用户shell 可以在/etc/passwd ...

    5. QThread详解

      回顾Qt之线程(QThread),里面讲解了如何使用线程,但还有很多人留言没有看明白,那么今天我们来一起瞅瞅关于QThread管理线程的那些事儿... 一.线程管理 1.线程启动 void start ...

    6. GoldenGate 12.3 MA架构介绍系列(1) - 安装

      GoldenGate 12.3微服务架构与传统架构的区别可参考: http://www.cnblogs.com/margiex/p/7439574.html 下载地址:http://www.oracl ...

    7. css相关知识点

      一.CSS的引入方式 1.1 css的介绍 HTML:超文本标记语言.从语义的角度描述页面结构. CSS:层叠样式表.从审美的角度负责页面样式. JS:JavaScript .从交互的角度描述页面行为 ...

    8. Makefile shell subst $(1)

      MAKE_3_80_realpath    = $(shell $(top_srcdir)/scripts/realpath.sh '$(subst $(SQUOTE),\\$(SQUOTE),$(1 ...

    9. innobackup stream 压缩备份,解压后的qp文件

      是用innobackup stream 压缩备份,解压后很多文件还是qp格式的压缩文件,需要再解压. 备份: [root@ ~]# /usr/bin/innobackupex --defaults-f ...

    10. windows下使用命令行运行PHP

      之前一直想,在命令行下能不能运行PHP程序,像C语言一样可以通过命令行拿到参数.今天尝试了一下发现可感觉挺有意思的,平时写着程序玩的时候就可以这样用,下面让咱么来看看怎么做的.我的环境是 php5.6 ...