使用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. Oracle表空间管理相关

    以下以我自己的测试环境举例: 1.表空间的 block_size 为 8192字节,即8KBytes.从数据字典中查到 max_size 为 2147483645,即约为15.9TBytes. 2.在 ...

  2. jquer文字闪烁简单实现

    arguments.callee <script type="text/javascript"> (function () { $(".usesend&quo ...

  3. Yii2将查询数据变为键值对数组及查询构建器

  4. GitHub 代码上传

    方法一 登录GitHub后,点击下面的图 New responsitory 按钮 或者点击绿色按钮 New repository,新建一个新建一个远程仓库(remote repository),点击后 ...

  5. 3D模型文字动画

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  6. shell =~ 引发的思考

    =~不是按位取反 1.[[]] if [[]]中引用变量不用加 双引号(")了,而if[]中变量必须加双引号,如if[ -n "$test" ],不然一些特殊的地方,会出 ...

  7. window.open()居中显示

    function openwindow(url,name,iWidth,iHeight){ // url 转向网页的地址 // name 网页名称,可为空 // iWidth 弹出窗口的宽度 // i ...

  8. mysql 导入大文件

     set global max_allowed_packet=1000000000; set global net_buffer_length=1000000; 

  9. Golang字符串函数认识(一)

    package main import ( "fmt" "strings" "strconv" ) func main(){ //返回字符串 ...

  10. yield表达式形式

    首先了解 1.iterator iterator叫做迭代器,用来遍历可以序列化的数据,比如一个list,set 等,当然如果对象想要能够使用迭代器来遍历,只要在该对象的类中添加__iter__()方法 ...