kubectl-aks icon indicating copy to clipboard operation
kubectl-aks copied to clipboard

Allow running `check-apiserver-connectivity` on multiple nodes in parallel

Open blanquicet opened this issue 1 year ago • 0 comments

Current situation

It is only possible to run check-apiserver-connectivity on one single node:

kubectl aks check-apiserver-connectivity --node aks-agentpool-27170680-vmss000000

Or:

kubectl aks config import
kubectl aks config use-node aks-agentpool-27170680-vmss000000

# Automatically run on aks-agentpool-27170680-vmss000000
kubectl aks check-apiserver-connectivity

Impact

User can only check one node at a time, or manually run the command in parallel from the shell.

Ideal situation

The check-apiserver-connectivity should allow to run it on more than one node. I see three options we should implement:

  1. Initial support could simply run on all nodes available in the config file:

    kubectl aks check-apiserver-connectivity --all-nodes
    
  2. But, what if we have nodes from different clusters in the config file? I should be able to specify the cluster I want to test:

    # It retrieves info for all nodes in the cluster and then run the check
    kubectl aks check-apiserver-connectivity --resource-group <myRG> --cluster-name <myCluster>
    

    It requires to store the cluster information (rg and cluster name) inside the config file to avoid retrieving again information we already have:

    kubectl aks config import --resource-group <myRG> --cluster-name <myCluster>
    
    # This time it reuses the info of cluster's nodes already available in the config file
    kubectl aks check-apiserver-connectivity --resource-group <myRG> --cluster-name <myCluster>
    
  3. But, what if the cluster is too big and I just want a subset of nodes?

    kubectl aks config import --resource-group <myRG> --cluster-name <myCluster>
    
    # On specific nodes and info is taken from config file
    kubectl aks check-apiserver-connectivity --nodes node1,node2,nodeX
    
### Tasks
- [ ] Support use case 1: #3 
- [ ] Support use case 2: TODO(Create issue)
- [ ] Support use case 3: TODO(Create issue)

blanquicet avatar Feb 05 '24 22:02 blanquicet