Changes between Version 5 and Version 6 of linux/openshift


Ignore:
Timestamp:
2018/01/04 12:31:38 (6 years ago)
Author:
yuna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • linux/openshift

    v5 v6  
    3030}}} 
    3131 
    32 == イメージのプッシュ 
     32== イメージのプッシュ(内部レジストリ) 
     33{{{ 
     34■内部レジストリのURL確認 
     35[root@os-master1 ~]# oc login -u system:admin 
     36Logged into "https://os-master1.local:8443" as "system:admin" using existing credentials. 
     37 
     38You have access to the following projects and can switch between them with 'oc project <projectname>': 
     39 
     40  * common 
     41    default 
     42    kube-public 
     43    kube-service-catalog 
     44    kube-system 
     45    logging 
     46    management-infra 
     47    openshift 
     48    openshift-infra 
     49    openshift-node 
     50 
     51Using project "common". 
     52[root@os-master1 ~]# oc get svc -n  default 
     53NAME               CLUSTER-IP       EXTERNAL-IP   PORT(S)                   AGE 
     54docker-registry    172.30.207.150   <none>        5000/TCP                  3d 
     55kubernetes         172.30.0.1       <none>        443/TCP,53/UDP,53/TCP     3d 
     56registry-console   172.30.108.12    <none>        9000/TCP                  3d 
     57router             172.30.164.49    <none>        80/TCP,443/TCP,1936/TCP   3d 
     58 
     59■イメージのタグを作成 
     60# docker tag docker.io/nginx:latest 172.30.207.150:5000/common/nginx:latest 
     61 
     62■一般ユーザ(not system:admin)権限でログインしなおす 
     63# oc login  
     64Authentication required for https://os-master1.local:8443 (openshift) 
     65Username: admin 
     66Password: 
     67Login successful. 
     68 
     69You have one project on this server: "common" 
     70 
     71Using project "common". 
     72 
     73■レジストリにログイン 
     74# docker login -u $(oc whoami) -p $(oc whoami -t) 172.30.207.150:5000 
     75Login Succeeded 
     76■プッシュ 
     77# docker push  172.30.207.150:5000/common/nginx:latest 
     78}}} 
     79 
     80== イメージのプッシュ(外部レジストリ) 
    3381{{{ 
    3482OpenShiftにログイン