mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #4622 from satnam6502/cluster-logging
Update cluster logging documentation to use kubectl for public IPs
This commit is contained in:
commit
ea5d2f99ae
@ -30,5 +30,5 @@ get:
|
|||||||
${KUBECTL} get services
|
${KUBECTL} get services
|
||||||
|
|
||||||
net:
|
net:
|
||||||
gcloud compute forwarding-rules describe elasticsearch-logging
|
${KUBECTL} get services elasticsearch-logging -o json
|
||||||
gcloud compute forwarding-rules describe kibana-logging
|
${KUBECTL} get services kibana-logging -o json
|
||||||
|
@ -84,28 +84,81 @@ elasticsearch-logging <none> name=elasticse
|
|||||||
kibana-logging <none> name=kibana-logging 10.0.208.114 5601
|
kibana-logging <none> name=kibana-logging 10.0.208.114 5601
|
||||||
|
|
||||||
```
|
```
|
||||||
On the GCE provider you can also obtain the external IP addresses of the Elasticsearch and Kibana services:
|
The `net` rule in the Makefile will report information about the Elasticsearch and Kibana services including the public IP addresses of each service.
|
||||||
```
|
```
|
||||||
$ make net
|
$ make net
|
||||||
IPAddress: 130.211.120.118
|
../../../kubectl.sh get services elasticsearch-logging -o json
|
||||||
IPProtocol: TCP
|
current-context: "kubernetes-satnam_kubernetes"
|
||||||
creationTimestamp: '2015-01-08T10:30:34.210-08:00'
|
Running: ../../../../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get services elasticsearch-logging -o json
|
||||||
id: '12815488049392139704'
|
{
|
||||||
kind: compute#forwardingRule
|
"kind": "Service",
|
||||||
name: elasticsearch-logging
|
"id": "elasticsearch-logging",
|
||||||
portRange: 9200-9200
|
"uid": "e5bf0a51-b87f-11e4-bd62-42010af01267",
|
||||||
region: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1
|
"creationTimestamp": "2015-02-19T21:40:18Z",
|
||||||
selfLink: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1/forwardingRules/elasticsearch-logging
|
"selfLink": "/api/v1beta1/services/elasticsearch-logging?namespace=default",
|
||||||
target: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1/targetPools/elasticsearch-logging
|
"resourceVersion": 68,
|
||||||
gcloud compute forwarding-rules describe kibana-logging
|
"apiVersion": "v1beta1",
|
||||||
IPAddress: 146.148.40.158
|
"namespace": "default",
|
||||||
IPProtocol: TCP
|
"port": 9200,
|
||||||
creationTimestamp: '2015-01-08T10:31:05.715-08:00'
|
"protocol": "TCP",
|
||||||
id: '2755171906970792849'
|
"labels": {
|
||||||
kind: compute#forwardingRule
|
"name": "elasticsearch-logging"
|
||||||
name: kibana-logging
|
},
|
||||||
portRange: 5601-5601
|
"selector": {
|
||||||
region: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1
|
"name": "elasticsearch-logging"
|
||||||
selfLink: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1/forwardingRules/kibana-logging
|
},
|
||||||
target: https://www.googleapis.com/compute/v1/projects/kubernetes-elk/regions/us-central1/targetPools/kibana-logging
|
"createExternalLoadBalancer": true,
|
||||||
|
"publicIPs": [
|
||||||
|
"104.154.81.135"
|
||||||
|
],
|
||||||
|
"containerPort": "es-port",
|
||||||
|
"portalIP": "10.0.58.62",
|
||||||
|
"sessionAffinity": "None"
|
||||||
|
}
|
||||||
|
../../../kubectl.sh get services kibana-logging -o json
|
||||||
|
current-context: "kubernetes-satnam_kubernetes"
|
||||||
|
Running: ../../../../cluster/gce/../../_output/dockerized/bin/linux/amd64/kubectl get services kibana-logging -o json
|
||||||
|
{
|
||||||
|
"kind": "Service",
|
||||||
|
"id": "kibana-logging",
|
||||||
|
"uid": "e5bd4617-b87f-11e4-bd62-42010af01267",
|
||||||
|
"creationTimestamp": "2015-02-19T21:40:18Z",
|
||||||
|
"selfLink": "/api/v1beta1/services/kibana-logging?namespace=default",
|
||||||
|
"resourceVersion": 67,
|
||||||
|
"apiVersion": "v1beta1",
|
||||||
|
"namespace": "default",
|
||||||
|
"port": 5601,
|
||||||
|
"protocol": "TCP",
|
||||||
|
"labels": {
|
||||||
|
"name": "kibana-logging"
|
||||||
|
},
|
||||||
|
"selector": {
|
||||||
|
"name": "kibana-logging"
|
||||||
|
},
|
||||||
|
"createExternalLoadBalancer": true,
|
||||||
|
"publicIPs": [
|
||||||
|
"104.154.91.224"
|
||||||
|
],
|
||||||
|
"containerPort": "kibana-port",
|
||||||
|
"portalIP": "10.0.124.153",
|
||||||
|
"sessionAffinity": "None"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
For this example the Elasticsearch service is running at `http://104.154.81.135:9200`.
|
||||||
|
```
|
||||||
|
$ curl http://104.154.81.135:9200
|
||||||
|
{
|
||||||
|
"status" : 200,
|
||||||
|
"name" : "Wombat",
|
||||||
|
"cluster_name" : "elasticsearch",
|
||||||
|
"version" : {
|
||||||
|
"number" : "1.4.4",
|
||||||
|
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
|
||||||
|
"build_timestamp" : "2015-02-19T13:05:36Z",
|
||||||
|
"build_snapshot" : false,
|
||||||
|
"lucene_version" : "4.10.3"
|
||||||
|
},
|
||||||
|
"tagline" : "You Know, for Search"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Visiting the URL `http://104.154.91.224:5601` should show the Kibana viewer for the logging information stored in the Elasticsearch service running at `http://104.154.81.135:9200`.
|
||||||
|
Loading…
Reference in New Issue
Block a user