forked from jhong40/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcks
37 lines (26 loc) · 711 Bytes
/
cks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
kubectl proxy - Opens proxy port to API server
kubectl port-forward - Opens port to target deployment pods
### Verify binary
shasum -a 512 kubernetes.tar.gz
sha512sum kubernetes.tar.gz
#### kubectl proxy
$ k proxy
Starting to serve on 127.0.0.1:8001
$ curl http://localhost:8001/
$ curl http://localhost:8001/api/v1/namespaces/default/services/nginx/proxy/
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
#### port-forward
$ k port-forward service/nginx 28080:80
Forwarding from 127.0.0.1:28080 -> 80
Forwarding from [::1]:28080 -> 80
Handling connection for 28080
$ curl http://localhost:28080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>