zoukankan      html  css  js  c++  java
  • Openshift创建Router和Registry

    Openshift创建Router和Registry:

    [root@DockerServer openshift]# oadm policy add-scc-to-user privileged system:serviceacount:default:router

    scc "privileged" added to: ["system:serviceacount:default:router"]

    [root@DockerServer openshift]# oadm policy add-scc-to-user hostnetwork system:serviceaccount:default:router

    scc "hostnetwork" added to: ["system:serviceaccount:default:router"]

    [root@DockerServer openshift]# oadm policy add-scc-to-user privileged system:serviceaccount:default:router

    scc "privileged" added to: ["system:serviceaccount:default:router"]

    [root@DockerServer openshift]# oadm router router --replicas=1 --service-account=router

    info: password for stats user admin has been set to gEpwLc6BC4

    --> Creating router router ...

        serviceaccount "router" created

        clusterrolebinding "router-router-role" created

        deploymentconfig "router" created

        service "router" created

    --> Success

    Same way:

    [root@DockerServer openshift]# oadm policy add-scc-to-user privileged -z router

    scc "privileged" added to: ["system:serviceaccount:default:router"]

    [root@DockerServer openshift]# oc adm policy add-scc-to-user hostnetwork -z router

    scc "hostnetwork" added to: ["system:serviceaccount:default:router"]

    [root@DockerServer openshift]# oc get pod -n default

    NAME             READY     STATUS    RESTARTS   AGE

    router-1-bd6f2   1/1       Running   0          4m

    [root@DockerServer openshift]# ss -ltn|egrep -w "80|443"

    LISTEN     0      128          *:80                       *:*

    LISTEN     0      128          *:443                      *:*

    [root@DockerServer openshift]# oadm registry --config=/opt/openshift/openshift.local.config/master/admin.kubeconfig --service-account=registry

    --> Creating registry registry ...

        serviceaccount "registry" created

        clusterrolebinding "registry-registry-role" created

        deploymentconfig "docker-registry" created

        service "docker-registry" created

    --> Success

    [root@DockerServer openshift]# oc get pod

    NAME                      READY     STATUS    RESTARTS   AGE

    docker-registry-1-2kqtb   1/1       Running   0          1m

    router-1-bd6f2            1/1       Running   0          29m

    [root@DockerServer openshift]# vi /etc/sysconfig/docker

    OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --registry-mirror=https://docker.mirrors.ustc.edu.cn --insecure-registry=172.30.0.0/16'

    [root@DockerServer openshift]# systemctl restart docker

  • 相关阅读:
    javasscript学习笔记 之 数组学习二 数组的所有方法
    JavaScript学习笔记之 数组方法一 堆栈 和队列
    JavaScript学习笔记:检测数组方法
    _bzoj1500 [NOI2005]维修数列【真·Splay】
    _bzoj1012 [JSOI2008]最大数maxnumber【Fenwick Tree】
    _bzoj1010 [HNOI2008]玩具装箱toy【斜率优化dp】
    _bzoj3224 Tyvj 1728 普通平衡树【Splay】
    _bzoj2002 [Hnoi2010]Bounce 弹飞绵羊【分块】
    _bzoj1001 [BeiJing2006]狼抓兔子【平面图】
    _bzoj1036 [ZJOI2008]树的统计Count【树链剖分】
  • 原文地址:https://www.cnblogs.com/AK47Sonic/p/9000785.html
Copyright © 2011-2022 走看看