In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
As a user of Kubernetes, the most frequently used command every day is kubectl XXX.
Kubectl is actually a console, which mainly provides the following functions:
1. Provide REST API interface for Kubernetes cluster management, including authentication authorization, data verification and cluster status change
two。 Provides a hub for data exchange and communication between other modules (other modules query or modify data through API Server, and only API Server directly manipulates etcd)
In other words, every kubectl command we enter in the terminal is actually a Restful API call to Kubernetes API server.
We can do an experiment:
Kubectl get secret-vault 9, which sets the highest level of trace through-vault 9:
Observe from the output that the call to API server to retrieve all the secret url: https://xxxx/api/v1/namespaces/ / secrets?limit=500:
The format of this HTTP request can be found on the Kubernetes website.
So how does the kubectl command know which API server to send the request to?
Run the command kubectl config view to display the server in the content: the address that follows is the url of API server.
The content displayed by kubectl config view comes from the configuration file: ~ / .kube/config:
In fact, Kubernetes's kubectl works the same way as CloudFoundry's command-line tool cf.
Set the operating system environment variable CF_TRACE = true
Then execute any cf command, and you can see that these commands are actually sending a HTTP request to an endpoint in SAP Cloud Platform.
Example: cf logs connectvity-demo-approuter-- recent
You can then see the payload of the HTTP requests and responses sent to complete this command.
For more original Jerry articles, please follow the official account "Wang Zixi":
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.