IBM Cloud Docs
调试位置控制平面的运行状况

调试位置控制平面的运行状况

创建 Satellite 位置 时,IBM 会自动为 IBM Cloud中的位置控制平面设置主节点。 此外,必须将至少三个主机分配到 Satellite 位置控制平面作为工作程序节点,以运行 IBM 配置的位置组件。 如果在主机上运行的位置控制平面存在问题,那么可以调试位置控制平面。

  1. 获取 Satellite 位置标识。
    ibmcloud sat location ls
    
  2. 列出位置控制平面主机的子域的 主机名
    ibmcloud sat location dns ls --location <location_name_or_ID>
    
    示例输出
    Retrieving location subdomains...
    OK
    Hostname                                                                                                 Records                                                                                                Health Monitor   SSL Cert Status   SSL Cert Secret Name                                          Secret  Namespace   
    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c000.us-east.satellite.appdomain.cloud   169.62.  196.20,169.62.196.23,169.62.196.30                                                                None             created           ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c000     default   
    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c001.us-east.satellite.appdomain.cloud   169.62.  196.30                                                                                            None             created           ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c001     default   
    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c002.us-east.satellite.appdomain.cloud   169.62.  196.20                                                                                            None             created           ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c002     default   
    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c003.us-east.satellite.appdomain.cloud   169.62.  196.23                                                                                            None             created           ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c003     default   
    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-ce00.us-east.satellite.appdomain.cloud    ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-c000.us-east.satellite.appdomain.cloud            None             created           ne1d37313068166254bcb-edfc0a8ba65085c5081eced6816c5b9c-ce00      default  
    
  3. 通过对每个主机名端点进行卷曲来检查控制平面位置子域的运行状况。 如果端点针对每个主机返回 200 响应,那么控制平面节点正常运行并为 Kubernetes 流量提供服务。 如果没有,请继续执行下一步。
    curl -v http://<hostname>:30000
    
    失败响应的示例输出
    * Rebuilt URL to: http://169.xx.xxx.xxx:30000/
    *   Trying 169.xx.xxx.xxx...
    * TCP_NODELAY set
    * Connection failed
    * connect to 169.xx.xxx.xxx port 30000 failed: Operation timed out
    * Failed to connect to 169.xx.xxx.xxx port 30000: Operation timed out
    * Closing connection 0
    curl: (7) Failed to connect to 169.xx.xxx.xxx port 30000: Operation timed out
    
    200 响应的示例输出
    * Rebuilt URL to: http://169.xx.xxx.xxx:30000/
    *   Trying 169.xx.xxx.xxx...
    * TCP_NODELAY set
    * Connected to 169.xx.xxx.xxx (169.xx.xxx.xxx) port 30000 (#0)
    > GET / HTTP/1.1
    > Host: 169.xx.xxx.xxx:30000
    > User-Agent: curl/7.54.0
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < content-length: 58
    < cache-control: no-cache
    < content-type: text/html
    < connection: close
    <
    <html><body><h1>200 OK</h1>
    Service ready.
    </body></html>
    * Closing connection 0
    
  4. 查找未返回 200 响应的主机的 标识。 您可以将上一步中的 Host: 169.xx.xxx.xxx 与以下命令的输出中的 工作程序 IP 进行比较。
    ibmcloud sat host ls --location <location_ID> | grep infrastructure
    
    示例输出
    Name     ID                     State        Status   Cluster          Worker ID                Worker IP   
    host1    aaaaa1a11aaaaaa111aa   assigned     Ready    infrastructure   sat-virtualser-1234...   169.xx.xxx.xxx   
    host2    bbbbbbb22bb2bbb222b2   assigned     Ready    infrastructure   sat-virtualser-1234...   169.xx.xxx.xxx  
    host3    ccccc3c33ccccc3333cc   assigned     Ready    infrastructure   sat-virtualser-1234...   169.xx.xxx.xxx  
    
  5. 将主机添加到同一区域中的控制平面,以便在除去运行状况不佳的主机时,位置控制平面具有足够的计算资源来继续运行。
  6. 从位置控制平面中除去运行状况不佳的主机
  7. 可选: 可以在运行不正常的主机上重新装入操作系统,然后再次尝试将该主机连接并分配给 IBM Cloud Satellite。