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 ...
随机推荐
- Ngine X 完全开发指南 读书笔记-前言
一开始接触的编程语言是VF,那是一种可视化编程语言,所谓的可视化,就是运行结果能直接看得到的,非常直观,便于调试,适合刚刚接触编程的新人学习.当时学得懵懂,半知半解,就是感觉程序非常神奇,常常几句代码 ...
- 【Redis学习之七】Redis持久化
环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 redis-2.8.18 什么是持久化? 将数据从掉电易失的 ...
- android dumpsys
dumpsys dumpsys is a tool that runs on Android devices and provides information about system service ...
- 设计模式之Interpreter(解释器)(转)
Interpreter定义: 定义语言的文法 ,并且建立一个解释器来解释该语言中的句子. Interpreter似乎使用面不是很广,它描述了一个语言解释器是如何构成的,在实际应用中,我们可能很少去构造 ...
- nextjs 服务端渲染请求参数
Post.getInitialProps = async function (context) { const { id } = context.query const res = await fet ...
- javanio2
package com.lanhuigu.nio.selector; import java.net.InetSocketAddress; import java.nio.ByteBuffer; im ...
- System.map文件的作用解析
有关System.map文件的信息好象很缺乏.其实它一点也不神秘,并且在整个事情当中它并不象看上去那么得重要.但是由于缺乏必要的文档说明,使其显得比较神秘.它就象耳垂,我们每个人都有,但却不知道是干什 ...
- Mysql高级第一天(laojia)
select char_length('我们love'); select *, char_length(sname) '姓名字数' from tbl_student; select '对方' + '5 ...
- Java日志 #01# 入门
很多人在学习完一个东西之后就会忘掉自己作为初学者时的体验.. 例如刚接触git的时候自己也是一头雾水,然后别人问起来,老是会说:xxxx#!@#,就是这么回事儿,有什么不好懂的. 其实从不懂到懂,再到 ...
- 利用Python实现多线程聊天功能
#-*- coding:utf-8 -*- from threading import Thread from socket import * #1.实现接收消息 def recvDate(): wh ...
- Docker命令学习