https://docs.rancher.cn/docs/rancher2.5/cli/_index

https://rancher.riyimei.cn/v3
token-j7n52
2vs674khhxhl82qkzbfvgkbjxmjk6sngg8j724hmv6btvrtrt44z77
token-j7n52:2vs674khhxhl82qkzbfvgkbjxmjk6sngg8j724hmv6btvrtrt44z77



NUMBER CLUSTER NAME PROJECT ID PROJECT NAME PROJECT DESCRIPTION1 riyimei-prod c-l7c4h:p-br2bz Default Default project created for the cluster2 riyimei-prod c-l7c4h:p-gv66p riyimei3 riyimei-prod c-l7c4h:p-v6c79 rbd-system4 riyimei-prod c-l7c4h:p-vrdr9 System System project created for the cluster5 local local:p-8hwx7 Default Default project created for the cluster6 local local:p-rff8t System System project created for the clusterSelect a Project:riyimeiInvalid input, enter a number between 1 and 6: 2INFO[0148] Saving config to /root/.rancher/cli2.json

rancher 命令行
[root@liwm ~]# rancher kubectl -n kube-system get podNAME READY STATUS RESTARTS AGEcalico-kube-controllers-6c8ddcb6cd-qj75t 1/1 Running 1 60dcanal-29zz5 2/2 Running 2 60dcanal-n9rt9 2/2 Running 37 60dcanal-sdswf 2/2 Running 20 60dcanal-vrgvm 2/2 Running 3 60dcanal-xpldz 2/2 Running 2 60dcoredns-656bcdc579-lcz44 1/1 Running 4 54dcoredns-656bcdc579-nx4df 1/1 Running 3 54dcoredns-autoscaler-79599b9dc6-ms9rj 1/1 Running 3 54dmetrics-server-6cc9c79d8c-qbwrn 1/1 Running 21 60drke-coredns-addon-deploy-job-gbmzf 0/1 Completed 0 60drke-metrics-addon-deploy-job-lrq8q 0/1 Completed 0 60drke-network-plugin-deploy-job-jqtpb 0/1 Completed 0 60d[root@liwm ~]#
[root@liwm ~]# rancher -hRancher CLI, managing containers one UTF-8 character at a timeUsage: rancher [OPTIONS] COMMAND [arg...]Version: v2.4.9Options:--debug Debug logging--help, -h show help--version, -v print the versionCommands:apps, [app] Operations with apps. Uses helm. Flags prepended with "helm" can also be accurately described by helm documentation.catalog Operations with catalogsclusters, [cluster] Operations on clusterscontext Operations for the contextglobaldns Operations on global DNS providers and entriesinspect View details of resourceskubectl Run kubectl commandslogin, [l] Login to a Rancher servermulticlusterapps, [multiclusterapp mcapps mcapp] Operations with multi-cluster appsnamespaces, [namespace] Operations on namespacesnodes, [node] Operations on nodesprojects, [project] Operations on projectsps Show workloads in a projectserver Operations for the serversettings, [setting] Show settings for the current serverssh SSH into a nodeup apply compose configwait Wait for resources cluster, app, project, multiClusterApptoken Authenticate and generate new kubeconfig tokenhelp, [h] Shows a list of commands or help for one commandRun 'rancher COMMAND --help' for more information on a command.[root@liwm ~]#
