1.节点添加

在新节点上编辑yum源/etc/yum.repo.d/ocp.repo

/etc/hosts在主和节点上都加上相应信息

编辑host文件,加入

  1. [OSEv3:children]
  2. masters
  3. nodes
  4. etcd
  5. new_nodes
  6.  
  7. [new_nodes]
  8. node3.example.com openshift_node_group_name='node-config-compute'

然后运行

  1. cd /usr/share/ansible/openshift-ansible
  2. ansible-playbook playbooks/openshift-node/scaleup.yml

机器资源不够,添加到最后审批阶段不通过,一看master 8443端口都不响应了,去掉infra节点后再来居然可以了。:-(

  1. TASK [Approve node certificates when bootstrapping] *****************************************************************************************************
  2. Monday December :: + (::00.416) ::43.233 *******
  3. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  4. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  5. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  6. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  7. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  8. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  9. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  10. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  11. FAILED - RETRYING: Approve node certificates when bootstrapping ( retries left).
  1. PLAY RECAP **********************************************************************************************************************************************
  2. localhost : ok= changed= unreachable= failed=
  3. master.example.com : ok= changed= unreachable= failed=
  4. node3.example.com : ok= changed= unreachable= failed=
  5.  
  6. INSTALLER STATUS ****************************************************************************************************************************************
  7. Initialization : Complete (::)
  8. Node Bootstrap Preparation : Complete (::)
  9. Node Join : Complete (::)

Monday 03 December 2018 16:51:24 +0800 (0:00:00.471) 0:10:22.945 *******
===============================================================================
Approve node certificates when bootstrapping --------------------------------------------------------------------------------------------------- 185.53s
Run variable sanity checks ---------------------------------------------------------------------------------------------------------------------- 55.58s
Gathering Facts --------------------------------------------------------------------------------------------------------------------------------- 53.54s
container_runtime : Fixup SELinux permissions for docker ---------------------------------------------------------------------------------------- 22.34s
get openshift_current_version -------------------------------------------------------------------------------------------------------------------- 8.66s
Detecting Operating System from ostree_booted ---------------------------------------------------------------------------------------------------- 8.30s
Gather Cluster facts ----------------------------------------------------------------------------------------------------------------------------- 7.91s
openshift_sanitize_inventory : Check for usage of deprecated variables --------------------------------------------------------------------------- 7.17s
openshift_sanitize_inventory : set_stats --------------------------------------------------------------------------------------------------------- 4.83s
Ensure openshift-ansible installer package deps are installed ------------------------------------------------------------------------------------ 4.74s
openshift_node : Update journald setup ----------------------------------------------------------------------------------------------------------- 4.05s
openshift_sanitize_inventory : include_tasks ----------------------------------------------------------------------------------------------------- 3.85s
Initialize openshift.node.sdn_mtu ---------------------------------------------------------------------------------------------------------------- 3.66s
openshift_manage_node : Wait for sync DS to set annotations on all nodes ------------------------------------------------------------------------- 3.41s
tuned : Ensure files are populated from templates ------------------------------------------------------------------------------------------------ 3.12s
set_fact openshift_portal_net if present on masters ---------------------------------------------------------------------------------------------- 2.79s
Gathering Facts ---------------------------------------------------------------------------------------------------------------------------------- 2.76s
openshift_manage_node : Set node schedulability -------------------------------------------------------------------------------------------------- 2.54s
openshift_sanitize_inventory : include_tasks ----------------------------------------------------------------------------------------------------- 2.54s
tuned : Restart tuned service -------------------------------------------------------------------------------------------------------------------- 2.45s

  1. [root@master openshift-ansible]# oc get nodes
  2. NAME STATUS ROLES AGE VERSION
  3. master.example.com Ready master 3d v1.11.0+d4cacc0
  4. node1.example.com NotReady infra 3d v1.11.0+d4cacc0
  5. node2.example.com Ready compute 3d v1.11.0+d4cacc0
  6. node3.example.com Ready compute 16m v1.11.0+d4cacc0

2.删除节点

  • 目前已经调度的pod
  1. [root@master openshift-ansible]# oc get pods --all-namespaces -o wide | grep node3
  2. openshift-monitoring node-exporter-r2qrs / Running 17m 192.168.56.106 node3.example.com <none>
  3. openshift-node sync-n4c7l / Running 17m 192.168.56.106 node3.example.com <none>
  4. openshift-sdn ovs-jnqjc / Running 17m 192.168.56.106 node3.example.com <none>
  5. openshift-sdn sdn-cc8zb / Running 17m 192.168.56.106 node3.example.com
    <none>

也可以通过

  1. [root@master openshift-ansible]# oc adm manage-node node3.example.com --list-pods
  2.  
  3. Listing matched pods on node: node3.example.com
  4.  
  5. NAMESPACE NAME READY STATUS RESTARTS AGE
  6. openshift-monitoring node-exporter-r2qrs / Running 18m
  7. openshift-node sync-n4c7l / Running 18m
  8. openshift-sdn ovs-jnqjc / Running 18m
  9. openshift-sdn sdn-cc8zb / Running 18m
  • 禁止调度
  1. oc adm cordon node3.example.com
  • 驱逐pod
  1. [root@master openshift-ansible]# oc adm drain node3.example.com --force=true
  2. node/node3.example.com already cordoned
  3. error: unable to drain node "node3.example.com", aborting command...
  4.  
  5. There are pending nodes to be drained:
  6. node3.example.com
  7. error: DaemonSet-managed pods (use --ignore-daemonsets to ignore): node-exporter-r2qrs, sync-n4c7l, ovs-jnqjc, sdn-cc8zb
  • 删除节点
  1. [root@master openshift-ansible]# oc delete nodes node3.example.com
  2. node "node3.example.com" deleted

Openshift 节点添加和删除的更多相关文章

  1. MongoDB 副本集节点添加与删除

    replica set多服务器主从,添加,删除节点,肯定会经常遇到的.下面详细说明一下,添加,删除节点的2种方法. 一,利用rs.reconfig,来添加,删除节点 1,添加节点 查看复制打印 rep ...

  2. jQuery的节点添加、删除、替换等操作

    //几种添加节点的方法 //$("p").append("<b>你好吗?</b>");//向p元素中追加<b> //$(&q ...

  3. 为DOM节点添加或者删除class

    项目中如果应用了常用的javascript类库,多数情况下,这些已经封装好的类库,都会封装一个类似于addClass和removeClass的方法,以便于我们对DOM节点的class进行操作. 以jQ ...

  4. ztree-编辑节点(树节点添加,删除,修改)

    <!DOCTYPE html> <HTML> <HEAD> <TITLE> ZTREE DEMO - addNodes / editName / rem ...

  5. js给节点添加或删除类名

    为 <div> 元素添加 class: document.getElementById(“myDIV”).classList.add(“mystyle”); 为 <div> 元 ...

  6. 用JS添加和删除class类名

    下面介绍一下如何给一个节点添加和删除class名 添加:节点.classList.add("类名"): 删除:节点.classList.remove("类名") ...

  7. js 与 jq 的节点添加删除实例

    JavaScript实例:XML DOM节点的添加 <!DOCTYPE html> <html> <head> <meta charset="utf ...

  8. 添加和删除节点(HTML 元素)。

    JavaScript HTML DOM 元素(节点)   添加和删除节点(HTML 元素). 创建新的 HTML 元素 如需向 HTML DOM 添加新元素,您必须首先创建该元素(元素节点),然后向一 ...

  9. (转载)html dom节点操作(获取/修改/添加或删除)

    DOM 是关于如何获取.修改.添加或删除 HTML 元素的标准,下面为大家介绍下html dom节点操作,感兴趣的朋友可以参考下   HTML DOM 是关于如何获取.修改.添加或删除 HTML 元素 ...

随机推荐

  1. make :err Makefile.ssl is older than Makefile.org. Reconfigure the source tree (via './config' or 'perl Configure'), please.

    内核编译时出现错误 Makefile.ssl is older than Makefile.org. Reconfigure the source tree (via './config' or 'p ...

  2. CF1064 E - Dwarves, Hats and Extrasensory Abilities

    题意 交互题, 本来应该是在平面上进行的. 实际上换成一条直线就可以, 其实换成在平面上更复杂一些. Solution 假设\(l\)点是黑点, \(r\)处是白点, 那么就把下一个点的位置放置在\( ...

  3. mybatis多表查询,自动生成id

    主要是在配置文件中,配置好所要包含的字段. 类关系:account----role,1对1 account包含role类 java类: public class Account{ private In ...

  4. 字符串截取,SubString

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAk8AAACYCAIAAAByAZqHAAAYgklEQVR4nO2dL28ku5qHTS4ctuTSQf ...

  5. HDU 3045 picnic cows(斜率DP)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3045 题目大意:有n个数,可以把n个数分成若干组,每组不得小于m个数,每组的价值=除了该组最小值以外每 ...

  6. Oracle数据库共享内存分配不足问题的解决

    问题: ORA-: unable to allocate bytes of shared memory ("shared pool,)","session param v ...

  7. 620. Not Boring Movies

    X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a ...

  8. Linux:hping高级主机扫描

    https://www.aliyun.com/jiaocheng/167107.html https://blog.csdn.net/weixin_39762926/article/details/7 ...

  9. LoadRunner脚本回放日志中的Warning信息

    关注LoadRunner脚本回放日志中的Warning信息   最近在与大家的讨论中发现了LoadRunner的很多问题,出于解决问题的出发点,我也就相关自己不理解的问题在Google中搜索了一番,并 ...

  10. 五十五 网络编程 UDP编程

    TCP是建立可靠连接,并且通信双方都可以以流的形式发送数据.相对TCP,UDP则是面向无连接的协议. 使用UDP协议时,不需要建立连接,只需要知道对方的IP地址和端口号,就可以直接发数据包.但是,能不 ...