Switch to proxy subresource
parent
d8100c6c30
commit
5ff30086e4
|
@ -233,30 +233,30 @@ with the `kubectl cluster-info` command:
|
||||||
$ kubectl cluster-info
|
$ kubectl cluster-info
|
||||||
|
|
||||||
Kubernetes master is running at https://104.197.5.247
|
Kubernetes master is running at https://104.197.5.247
|
||||||
elasticsearch-logging is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging
|
elasticsearch-logging is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy
|
||||||
kibana-logging is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/kibana-logging
|
kibana-logging is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/kibana-logging/proxy
|
||||||
kube-dns is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/kube-dns
|
kube-dns is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/kube-dns/proxy
|
||||||
grafana is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
|
grafana is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
|
||||||
heapster is running at https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/monitoring-heapster
|
heapster is running at https://104.197.5.247/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
This shows the proxy-verb URL for accessing each service.
|
This shows the proxy-verb URL for accessing each service.
|
||||||
For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached
|
For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached
|
||||||
at `https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/` if suitable credentials are passed, or through a kubectl proxy at, for example:
|
at `https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/` if suitable credentials are passed, or through a kubectl proxy at, for example:
|
||||||
`http://localhost:8080/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/`.
|
`http://localhost:8080/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`.
|
||||||
(See [above](#accessing-the-cluster-api) for how to pass credentials or use kubectl proxy.)
|
(See [above](#accessing-the-cluster-api) for how to pass credentials or use kubectl proxy.)
|
||||||
|
|
||||||
#### Manually constructing apiserver proxy URLs
|
#### Manually constructing apiserver proxy URLs
|
||||||
|
|
||||||
As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create proxy URLs that include service endpoints, suffixes, and parameters, you simply append to the service's proxy URL:
|
As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create proxy URLs that include service endpoints, suffixes, and parameters, you simply append to the service's proxy URL:
|
||||||
`http://`*`kubernetes_master_address`*`/api/v1/proxy/namespaces/`*`namespace_name`*`/services/`*`service_name[:port_name]`*
|
`http://`*`kubernetes_master_address`*`/api/v1/namespaces/`*`namespace_name`*`/services/`*`service_name[:port_name]`*`/proxy`
|
||||||
|
|
||||||
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL
|
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL
|
||||||
|
|
||||||
##### Examples
|
##### Examples
|
||||||
|
|
||||||
* To access the Elasticsearch service endpoint `_search?q=user:kimchy`, you would use: `http://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy`
|
* To access the Elasticsearch service endpoint `_search?q=user:kimchy`, you would use: `http://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_search?q=user:kimchy`
|
||||||
* To access the Elasticsearch cluster health information `_cluster/health?pretty=true`, you would use: `https://104.197.5.247/api/v1/proxy/namespaces/kube-system/services/elasticsearch-logging/_cluster/health?pretty=true`
|
* To access the Elasticsearch cluster health information `_cluster/health?pretty=true`, you would use: `https://104.197.5.247/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/_cluster/health?pretty=true`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|
|
@ -272,8 +272,8 @@ We install two UIs on Kubernetes. The original KubeUI and [the newer kube
|
||||||
dashboard](/docs/user-guide/ui/). When you create a cluster, the script should output URLs for these
|
dashboard](/docs/user-guide/ui/). When you create a cluster, the script should output URLs for these
|
||||||
interfaces like this:
|
interfaces like this:
|
||||||
|
|
||||||
KubeUI is running at ```https://${MASTER_IP}:6443/api/v1/proxy/namespaces/kube-system/services/kube-ui```
|
KubeUI is running at ```https://${MASTER_IP}:6443/api/v1/namespaces/kube-system/services/kube-ui/proxy```
|
||||||
kubernetes-dashboard is running at ```https://${MASTER_IP}:6443/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard```
|
kubernetes-dashboard is running at ```https://${MASTER_IP}:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy```
|
||||||
|
|
||||||
Note on Authentication to the UIs: The cluster is set up to use basic
|
Note on Authentication to the UIs: The cluster is set up to use basic
|
||||||
authentication for the user _admin_. Hitting the url at
|
authentication for the user _admin_. Hitting the url at
|
||||||
|
@ -316,7 +316,7 @@ the necessary certificates and serve locally over http.
|
||||||
kubectl proxy -p 8001
|
kubectl proxy -p 8001
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, you can access urls like ```http://127.0.0.1:8001/api/v1/proxy/namespaces/kube-system/services/kube-ui/``` without the need for client certificates in your browser.
|
Then, you can access urls like ```http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kube-ui/proxy/``` without the need for client certificates in your browser.
|
||||||
|
|
||||||
|
|
||||||
## What Kubernetes features do not work on CenturyLink Cloud
|
## What Kubernetes features do not work on CenturyLink Cloud
|
||||||
|
|
|
@ -175,10 +175,10 @@ Output:
|
||||||
|
|
||||||
```
|
```
|
||||||
Kubernetes master is running at https://52.15.104.227:443
|
Kubernetes master is running at https://52.15.104.227:443
|
||||||
Heapster is running at https://52.15.104.227:443/api/v1/proxy/namespaces/kube-system/services/heapster
|
Heapster is running at https://52.15.104.227:443/api/v1/namespaces/kube-system/services/heapster/proxy
|
||||||
KubeDNS is running at https://52.15.104.227:443/api/v1/proxy/namespaces/kube-system/services/kube-dns
|
KubeDNS is running at https://52.15.104.227:443/api/v1/namespaces/kube-system/services/kube-dns/proxy
|
||||||
Grafana is running at https://52.15.104.227:443/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
|
Grafana is running at https://52.15.104.227:443/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
|
||||||
InfluxDB is running at https://52.15.104.227:443/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb
|
InfluxDB is running at https://52.15.104.227:443/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
|
||||||
```
|
```
|
||||||
|
|
||||||
Congratulations, you've now set up a Kubernetes cluster!
|
Congratulations, you've now set up a Kubernetes cluster!
|
||||||
|
|
|
@ -270,9 +270,9 @@ With kubectl:
|
||||||
```shell
|
```shell
|
||||||
$ kubectl cluster-info
|
$ kubectl cluster-info
|
||||||
Kubernetes master is running at https://108.59.85.141
|
Kubernetes master is running at https://108.59.85.141
|
||||||
KubeDNS is running at https://108.59.85.141/api/v1/proxy/namespaces/kube-system/services/kube-dns
|
KubeDNS is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/kube-dns/proxy
|
||||||
KubeUI is running at https://108.59.85.141/api/v1/proxy/namespaces/kube-system/services/kube-ui
|
KubeUI is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/kube-ui/proxy
|
||||||
Grafana is running at https://108.59.85.141/api/v1/proxy/namespaces/kube-system/services/monitoring-grafana
|
Grafana is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
|
||||||
Heapster is running at https://108.59.85.141/api/v1/proxy/namespaces/kube-system/services/monitoring-heapster
|
Heapster is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
|
||||||
InfluxDB is running at https://108.59.85.141/api/v1/proxy/namespaces/kube-system/services/monitoring-influxdb
|
InfluxDB is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||||
var base = "/api/v1/";
|
var base = "/api/v1/";
|
||||||
|
|
||||||
var updateImage = function($http, server) {
|
var updateImage = function($http, server) {
|
||||||
$http.get(base + "proxy/namespaces/default/pods/" + server.podName + "/data.json")
|
$http.get(base + "namespaces/default/pods/" + server.podName + "/proxy/data.json")
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
server.image = data.image;
|
server.image = data.image;
|
||||||
|
|
Loading…
Reference in New Issue