You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Depending on your cluster environment, this may only expose the service to your corporate network,
33
+
or it may expose it to the internet. Think about whether the service being exposed is secure.
34
+
Does it do its own authentication?
35
+
- Place pods behind services. To access one specific pod from a set of replicas, such as for debugging,
36
+
place a unique label on the pod and create a new service which selects this label.
37
+
- In most cases, it should not be necessary for application developer to directly access
38
+
nodes via their nodeIPs.
39
+
- Access services, nodes, or pods using the Proxy Verb.
40
+
- Does apiserver authentication and authorization prior to accessing the remote service.
41
+
Use this if the services are not secure enough to expose to the internet, or to gain
42
+
access to ports on the node IP, or for debugging.
43
+
- Proxies may cause problems for some web applications.
44
+
- Only works for HTTP/HTTPS.
45
+
- Described [here](#manually-constructing-apiserver-proxy-urls).
49
46
- Access from a node or pod in the cluster.
50
-
- Run a pod, and then connect to a shell in it using [kubectl exec](/docs/reference/generated/kubectl/kubectl-commands/#exec).
51
-
Connect to other nodes, pods, and services from that shell.
52
-
- Some clusters may allow you to ssh to a node in the cluster. From there you may be able to
53
-
access cluster services. This is a non-standard method, and will work on some clusters but
54
-
not others. Browsers and other tools may or may not be installed. Cluster DNS may not work.
47
+
- Run a pod, and then connect to a shell in it using [kubectl exec](/docs/reference/generated/kubectl/kubectl-commands/#exec).
48
+
Connect to other nodes, pods, and services from that shell.
49
+
- Some clusters may allow you to ssh to a node in the cluster. From there you may be able to
50
+
access cluster services. This is a non-standard method, and will work on some clusters but
51
+
not others. Browsers and other tools may or may not be installed. Cluster DNS may not work.
55
52
56
53
### Discovering builtin services
57
54
@@ -75,19 +72,23 @@ heapster is running at https://192.0.2.1/api/v1/namespaces/kube-system/services/
75
72
76
73
This shows the proxy-verb URL for accessing each service.
77
74
For example, this cluster has cluster-level logging enabled (using Elasticsearch), which can be reached
78
-
at `https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/` if suitable credentials are passed, or through a kubectl proxy at, for example:
75
+
at `https://192.0.2.1/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy/`
76
+
if suitable credentials are passed, or through a kubectl proxy at, for example:
See [Access Clusters Using the Kubernetes API](/docs/tasks/administer-cluster/access-cluster-api/#accessing-the-cluster-api) for how to pass credentials or use kubectl proxy.
80
+
See [Access Clusters Using the Kubernetes API](/docs/tasks/administer-cluster/access-cluster-api/#accessing-the-cluster-api)
81
+
for how to pass credentials or use kubectl proxy.
83
82
{{< /note >}}
84
83
85
84
#### Manually constructing apiserver proxy URLs
86
85
87
-
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 append to the service's proxy URL:
86
+
As mentioned above, you use the `kubectl cluster-info` command to retrieve the service's proxy URL. To create
87
+
proxy URLs that include service endpoints, suffixes, and parameters, you append to the service's proxy URL:
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL. You can also use the port number in place of the *port_name* for both named and unnamed ports.
90
+
If you haven't specified a name for your port, you don't have to specify *port_name* in the URL. You can also
91
+
use the port number in place of the *port_name* for both named and unnamed ports.
91
92
92
93
By default, the API server proxies to your service using HTTP. To use HTTPS, prefix the service name with `https:`:
0 commit comments