Rancher does a good job of interfacing the Docker containers, but we have time to look at some of the container's information somewhere else, what do we do?
Rancher self-provided API
Click API to view
We were able to see some information about the container, actually
Http://www.waterlufei.xyz/v2-beta and HTTP://WWW.WATERLUFEI.XYZ/V1 on rancher open up a lot of APIs
But in the real world we can't use these APIs directly, because rancher is definitely setting up access control, and we need to add the API key
Here I add an Account API key, the environment here does not say the principle is similar, add good to put their keys and passwords to find a place to write down
You can access the user name and password when you visit the API in the future, for example, I access the API in a Linux system:
Curl-u key:password \
Http://IP:port/v2-beta/projects/1a5/containers/1i8049/volumes
This allows us to access the API.
In fact, API key is specifically used to access the API user name and password
If you enter the address of the above API directly in the browser, you will be prompted to enter the user name and password, where the user name and password is not your login account and password, but your API key username and password
Rancher API Key