使用docker获取rancher

[root@localhost /]# docker pull rancher/server:stable

[root@localhost /]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/hongdada/docker-centos latest bd4403c66e5e hours ago MB
docker.io/nginx latest 5699ececb21c days ago MB
docker.io/ubuntu 16.04 5e8b97a2a082 weeks ago MB
docker.io/rancher/server stable 85b3b338d0be weeks ago 1.08 GB
docker.io/tomcat latest 33e02377a00f months ago MB
docker.io/centos 7.2. 0a2bad7da9b5 months ago MB

可以看出rancher体积还是比较大的,有1个G

安装:

[root@localhost /]# docker run -d --restart=unless-stopped -p : rancher/server:stable
405098f5d97988758134da5d3f5c755c8745838a15777034721eed72c94d6a02
[root@localhost /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
405098f5d979 rancher/server:stable "/usr/bin/entry /u..." seconds ago Up seconds /tcp, 0.0.0.0:->/tcp relaxed_wescoff

按照上面的,打开对应的8888端口就可以访问到rancher页面

添加主机:

我本地是使用的虚拟机,重新克隆了一份,新主机ip为192.168.52.128

再次查看主机内部的docker:

[root@localhost hongdada]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/hongdada/docker-centos latest bd4403c66e5e hours ago MB
docker.io/nginx latest 5699ececb21c days ago MB
docker.io/ubuntu 16.04 5e8b97a2a082 weeks ago MB
docker.io/rancher/net v0.13.13 5a271da7cb72 weeks ago MB
docker.io/tomcat latest 33e02377a00f months ago MB
docker.io/rancher/agent v1.2.10 6023e1a77132 months ago MB
docker.io/rancher/dns v0.17.3 af151d7fa0e8 months ago MB
docker.io/rancher/healthcheck v0.3.6 db2d1e6261f3 months ago MB
docker.io/rancher/metadata v0.10.2 77299bd2078e months ago MB
docker.io/rancher/network-manager v0.7.20 eaf2cdb14863 months ago MB
docker.io/rancher/scheduler v0.8.3 3e640a41799a months ago MB
docker.io/centos 7.2. 0a2bad7da9b5 months ago MB
docker.io/rancher/net holder 665d9f6e8cc1 months ago MB
[root@localhost hongdada]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f8cc8d905ac9 rancher/healthcheck:v0.3.6 "/.r/r /rancher-en..." minutes ago Up minutes r-healthcheck-healthcheck--a09c6e05
a7c07c0070bb rancher/dns:v0.17.3 "/rancher-entrypoi..." minutes ago Up minutes r-network-services-metadata-dns--a2ed7714
9f8e9029dcab rancher/net:v0.13.13 "/rancher-entrypoi..." minutes ago Up minutes r-ipsec-ipsec-router--fb306133
a7cc7b763c35 rancher/net:v0.13.13 "/rancher-entrypoi..." minutes ago Up minutes r-ipsec-ipsec-connectivity-check--a26c3db5
0c09403c3624 rancher/net:holder "/.r/r /rancher-en..." minutes ago Up minutes r-ipsec-ipsec--b6e2afbc
13245a558e41 rancher/network-manager:v0.7.20 "/rancher-entrypoi..." minutes ago Up minutes r-network-services-network-manager--852edd6d
29ba06f2fa7e rancher/metadata:v0.10.2 "/rancher-entrypoi..." minutes ago Up minutes r-network-services-metadata--5469cf59
460c27a70adf rancher/net:v0.13.13 "/rancher-entrypoi..." minutes ago Up minutes r-ipsec-cni-driver--2d61af01
3bc6a13a6467 rancher/scheduler:v0.8.3 "/.r/r /rancher-en..." minutes ago Up minutes r-scheduler-scheduler--e4962c96
2d9171735c9c rancher/agent:v1.2.10 "/run.sh run" minutes ago Up minutes rancher-agent

发现添加主机以后,rancher会自动添加很多容器

创建容器:

查看主机:(只显示redis的)

[root@localhost hongdada]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/redis latest 71a81cb279e3 days ago 83.4 MB [root@localhost hongdada]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
17fdb5686e39 redis "/.r/r docker-entr..." seconds ago Up seconds r-redis--6e9bf620

使用Redis Desktop Manager连接192.168.52.128:6379,连接成功!

容器界面:

Kubernetes环境:

在Rancher的环境管理中添加Kubernetes环境,并添加对应主机

打开Kubernetes的ui界面

再次查看对应主机的镜像和容器

添加了很多Kubernetes的系统镜像,系统容器

[root@localhost hongdada]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/rancher/k8s v1.10.3-rancher1- 39c330dd42dc weeks ago 1.68 GB
docker.io/rancher/kubectld v0.8.7 7a13fc117413 months ago MB
docker.io/rancher/kubernetes-agent v0.6.7 752a77ffead6 months ago MB
docker.io/rancher/kubernetes-dashboard-amd64 v1.8.3 0c60bcf89900 months ago MB
docker.io/rancher/k8s-dns-kube-dns-amd64 1.14. 80cc5ea4b547 months ago 50.5 MB
docker.io/rancher/heapster-amd64 v1.5.0 86a0ddc3a8c2 months ago 75.3 MB
docker.io/rancher/lb-service-rancher v0.7.17 b7fa6b9cb097 months ago MB
docker.io/rancher/heapster-influxdb-amd64 v1.3.3 577260d221db months ago 12.5 MB
docker.io/rancher/heapster-grafana-amd64 v4.4.3 8cb3de219af7 months ago MB
docker.io/rancher/kubernetes-auth v0.0.8 ea0a0fa94c0c months ago MB
docker.io/rancher/etcd v2.3.7- 6c21cf015451 months ago 57.2 MB
docker.io/rancher/etc-host-updater v0.0.3 da6f714674e6 months ago MB
docker.io/rancher/pause-amd64 3.0 99e59f495ffa years ago kB
[root@localhost hongdada]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f06b4e933733 docker.io/rancher/tiller@sha256:9b373c71ea2dfdb7d42a6c6dada769cf93be682df7cfabb717748bdaef27d10a "/tiller --v=2" seconds ago Up Less than a second k8s_tiller_tiller-deploy-6ffff75db6-p7v5q_kube-system_b11e2bf6-813a-11e8-beaa-0277d64a57f7_0
440d2bb54f87 docker.io/rancher/heapster-amd64@sha256:25e47d10baaa53a3f24ee8768269bbff635543aba7d397a8275d83ad92fa8cb3 "/heapster --sourc..." seconds ago Up seconds k8s_heapster_heapster-6cfb49f776-m9cdz_kube-system_a0a1c958-813a-11e8-beaa-0277d64a57f7_0
a6b670be3e28 docker.io/rancher/heapster-influxdb-amd64@sha256:fc5cb5dec62a1ce562c62dc81c9bdf8c219a8dc9fc5c47af01fb36cdf7d1504e "influxd --config ..." seconds ago Up seconds k8s_influxdb_monitoring-influxdb-6fc88bd58d-7t4zg_kube-system_aabd590d-813a-11e8-beaa-0277d64a57f7_0
05fcea73c9e5 docker.io/rancher/heapster-grafana-amd64@sha256:714c2cb50410fd2c88bb6fae7e36e8d5da4490788c6346dfef229ec774b4711f "/run.sh" seconds ago Up seconds k8s_grafana_monitoring-grafana-76f5b489d5-cbkgs_kube-system_9df613c2-813a-11e8-beaa-0277d64a57f7_0
09d18e4d0916 docker.io/rancher/k8s-dns-kube-dns-amd64@sha256:6d8e0da4fb46e9ea2034a3f4cab0e095618a2ead78720c12e791342738e5f85d "/kube-dns --domai..." About a minute ago Up About a minute k8s_kubedns_kube-dns-75c8cb4ccb-4p2j6_kube-system_9a216ee8-813a-11e8-beaa-0277d64a57f7_0
5942ac630d41 docker.io/rancher/kubernetes-dashboard-amd64@sha256:050620264fb56824b1bc1b9876f9c17875d96bb9fb96d5c34027ddbf65786f62 "/dashboard --inse..." About a minute ago Up About a minute k8s_kubernetes-dashboard_kubernetes-dashboard-6f4c8b9cd5-cfcks_kube-system_9545a372-813a-11e8-beaa-0277d64a57f7_0
f89f191ba344 rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_tiller-deploy-6ffff75db6-p7v5q_kube-system_b11e2bf6-813a-11e8-beaa-0277d64a57f7_0
81ce204219c9 rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_monitoring-influxdb-6fc88bd58d-7t4zg_kube-system_aabd590d-813a-11e8-beaa-0277d64a57f7_0
8a351b7c19cb rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_heapster-6cfb49f776-m9cdz_kube-system_a0a1c958-813a-11e8-beaa-0277d64a57f7_1
c9f17ef6fe37 rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_monitoring-grafana-76f5b489d5-cbkgs_kube-system_9df613c2-813a-11e8-beaa-0277d64a57f7_0
a79fb6dfdfe7 rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_kube-dns-75c8cb4ccb-4p2j6_kube-system_9a216ee8-813a-11e8-beaa-0277d64a57f7_0
c4311516e9e2 rancher/pause-amd64:3.0 "/pause" About a minute ago Up About a minute k8s_POD_kubernetes-dashboard-6f4c8b9cd5-cfcks_kube-system_9545a372-813a-11e8-beaa-0277d64a57f7_0
d2fdb204a816 rancher/etc-host-updater:v0.0.3 "/rancher-entrypoi..." minutes ago Up minutes r-kubernetes-kubernetes-kube-hostname-updater--2f50b01d
6cfe2174f2ca rancher/k8s:v1.10.3-rancher1- "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-addon-starter--086f2eb4
37d96100ebda rancher/k8s:v1.10.3-rancher1- "/usr/bin/entry.sh..." minutes ago Up minutes r-kubernetes-kubelet--6129f445
e631f4acb106 rancher/k8s:v1.10.3-rancher1- "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-scheduler--f84e883d
2514ad4deed3 rancher/k8s:v1.10.3-rancher1- "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-controller-manager--bd6034b5
91a85568422e rancher/k8s:v1.10.3-rancher1- "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-kubernetes--ef08f84b
5d891477f408 rancher/k8s:v1.10.3-rancher1- "/usr/bin/entry.sh..." minutes ago Up minutes r-kubernetes-proxy--a2ab9a7f
825482c49203 rancher/kubernetes-agent:v0.6.7 "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-rancher-kubernetes-agent--
75c106178046 rancher/kubernetes-auth:v0.0.8 "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-rancher-kubernetes-auth--e362e1a5
2ec414b138d4 rancher/lb-service-rancher:v0.7.17 "/.r/r /usr/bin/en..." minutes ago Up minutes r-kubernetes-rancher-ingress-controller--d14b34e1
c3fb64580152 rancher/kubectld:v0.8.7 "/.r/r /rancher-en..." minutes ago Up minutes r-kubernetes-kubectld--0e85399a
2385d7798335 rancher/kubectld:v0.8.7 "/.r/r /rancher-en..." minutes ago Up minutes r-kubernetes-kubectl-shell--5d5431aa
8a57f064fd98 rancher/etcd:v2.3.7- "/.r/r /opt/ranche..." minutes ago Up minutes r-kubernetes-etcd--bbb53a30
e70fc5f41cbc rancher/dns:v0.17.3 "/rancher-entrypoi..." minutes ago Up minutes r-network-services-metadata-dns--e7079097

参考:

https://rancher.com/docs/rancher/v1.6/zh/installing-rancher/installing-server/#single-container

https://www.kubernetes.org.cn/2955.html

http://blog.51cto.com/john88wang/1946343

https://blog.csdn.net/csdn_duomaomao/article/details/76216046

Docker 编排工具Rancher 1.6.18的更多相关文章

  1. Docker 编排工具Rancher 2.0

    下载镜像: [root@localhost hongdada]# docker pull rancher/server:preview 运行容器: [root@localhost hongdada]# ...

  2. 安装docker管理工具rancher

    http://blog.csdn.net/freewebsys/article/details/51136562 docker(2):安装docker管理工具rancher rancher是一个Doc ...

  3. docker编排工具,docker-compose下载与安装

    安装很简单,但是难免会遇到问题:1.安装curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compos ...

  4. Docker编排工具Docker Compose的使用

    一.安装docker compose 官网推荐方式之一: sudo curl -L "https://github.com/docker/compose/releases/download/ ...

  5. 使用容器编排工具docker swarm安装clickhouse多机集群

    1.首先需要安装docker最新版,docker 目前自带swarm容器编排工具 2.选中一台机器作为master,执行命令sudo docker  swarm init [options] 3,再需 ...

  6. Docker Compose编排工具部署lnmp实践及理论(详细)

    目录 一.理论概述 编排 部署 Compose原理 二.使用docker compose 部署lnmp 三.测试 四.总结 一.理论概述 Docker Compose是一个定义及运行多个Docker容 ...

  7. Docker那些事儿之编排工具docker-compose

    前面已经讲解过docker的一些基础使用,镜像创建的操作过程,如果大量容器需要同时部署,一个一个容器进行服务器上的部署,估计要疯掉,在使用上我们需要找到更好更便捷的使用方式,今天要讲解的容器编排工具d ...

  8. 走进docker-swarm 带大家快速掌握docker自带编排工具

    什么是Docker Swarm? 对比Docker 前面我们介绍过Docker可以理解成是一个我们的服务的独立运行的容器,那么在实际工作中,我们的系统可能是一个微服务应用,系统中根据业务拆分成多个模块 ...

  9. Docker安装部署Rancher

    # 一.Rancher简介 [Rancher](https://www.cnrancher.com/rancher/)是一个开源的企业级容器管理平台.通过Rancher,企业再也不必自己使用一系列的开 ...

随机推荐

  1. 一 js数据类型

    一.简单的数据对象 ------1.小数 var fNum = 1.02; ------2.整数 var iNum = 1; ------3.逻辑变量 var bNum = true; 二.复杂的数据 ...

  2. uva 10163 Storage Keepers

    题意: 有n个仓库,m个人,一个仓库只能由一个人托管,每个人可以托管多个仓库. 每个人有一个能力值a,如果说他托管了k个仓库,那么这些仓库的安全值都是a/k. 雇佣一个人的花费也是a. 如果一个仓库没 ...

  3. 每天记命令:lscpu 和 cat /proc/cpuinfo

    [1]lscpu lscpu命令,查看cpu相关的统计信息. socket 就是主板上插cpu的槽的数目,也就是可以插入的物理CPU的个数(比如上例,可以插入1个CPU). core 就是我们平时说的 ...

  4. log4j日志输出使用_1

    转自https://www.cnblogs.com/sky230/p/5759831.html Log4j是帮助开发人员进行日志输出管理的API类库.它最重要的特点就可以配置文件灵活的设置日志信息的优 ...

  5. Vue + vant-UI 打造移动商城

  6. (Review cs231n)loss function and optimization

    分类器需要在识别物体变化时候具有很好的鲁棒性(robus) 线性分类器(linear classifier)理解为模板的匹配,根据数量,表达能力不足,泛化性低:理解为将图片看做在高维度区域 线性分类器 ...

  7. c# 共享事件处理程序

    使用同一个方法来处理多个Button实例的Click事件. 1.全选所有的Button,在事件添加中的Click点击事件中添加处理函数. 2.假如一个label控件用于显示按钮按下输出文本 3.处理函 ...

  8. [trick] 玩弄svn的目录结构

    今天在使用svn进行版本管理时出现了一个小问题: 原本在s目录下有一个c目录,不知为何被删除了,而svn st命令并没有认为它消失,svn up命令也无法下载回来: 从另一个地方拷贝过来一个c,svn ...

  9. Python+OpenCV图像处理(三)—— Numpy数组操作图片

    一.改变图片每个像素点每个通道的灰度值 (一) 代码如下: #遍历访问图片每个像素点,并修改相应的RGB import cv2 as cv def access_pixels(image): prin ...

  10. jumpserver堡垒机安装

    1. 下载jumpserver cd /opt wget https://github.com/jumpserver/jumpserver/archive/master.zip unzip maste ...