美文网首页
Kubernetes commandline for the p

Kubernetes commandline for the p

作者: Chao已被使用 | 来源:发表于2021-01-05 21:19 被阅读0次
    1. Navigate to the folder containing the scripts
    cd lora_kube
    
    1. Create cluster
    kind create cluster --config config.yaml
    
    1. Check the status of kind cluster
    kubectl cluster-info --context kind-kind
    

    Check out cluster info if needed

    kind get clusters
    kind get nodes
    kind get kubeconfig
    
    1. Create the deployment with the following command
    kubectl apply -f deployment.yaml
    

    Check out nodes/pods info

    kubectl get deploy
    kubectl get nodes
    kubectl get pods
    kubectl get all
    
    kubectl describe deployments
    
    kubectl exec pod-name -- curl 10.244.2.3
    
    kubectl exec -ti lora-5f696f676f-6mwvh /bin/bash
    
    curl https://172.18.0.2:31796 -k
    
    kind load docker-image eabsics/5g-dive:radiohead --name kind
    kind load docker-image eabsics/5g-dive:edge --name kind
    
    1. some useful command lines
      a. watch the logs from a container
    kubectl logs your-pod-here --follow
    for(( ; ; )); do kubectl logs --tail=1 your-pod-herej; sleep 1; done
    for((i=1;i<=1000;i+=1)); do kubectl logs --tail=1 pod/lora-deployment-edge-6bc89d56b8-snqcj; sleep 1; done
    

    相关文章

      网友评论

          本文标题:Kubernetes commandline for the p

          本文链接:https://www.haomeiwen.com/subject/xgblnktx.html