@@ -25,7 +25,7 @@ As part of this getting started guide, you will:
25
25
Binares are available on the [ releases page] [ cli-download ] . If you have
26
26
homebrew, you can install with:
27
27
28
- ``` bash
28
+ ``` bash copy
29
29
brew install grampelberg/kty/kty
30
30
```
31
31
@@ -47,7 +47,7 @@ In this example, we're using `cluster-admin` because it is everywhere and an
47
47
easy way to get started. You can change this to another role, anything with the
48
48
[ minimum permissions] ( /architecture/access-control#authorization ) in fact. Run:
49
49
50
- ``` bash
50
+ ``` bash copy
51
51
kty users grant cluster-admin me@example.com
52
52
```
53
53
@@ -59,14 +59,14 @@ kty users grant cluster-admin me@example.com
59
59
You can verify that this worked and you have the minimum permissions required by
60
60
running:
61
61
62
- ``` bash
62
+ ``` bash copy
63
63
kty users check me@example.com
64
64
```
65
65
66
66
This command runs a ` SelfSubjectAccessReview ` against your cluster. If you want
67
67
to use ` kubectl ` instead, you can run:
68
68
69
- ``` bash
69
+ ``` bash copy
70
70
kubectl auth can-i list pods --as me@example.com
71
71
```
72
72
@@ -76,7 +76,7 @@ While it isn't required that you run `kty` on your cluster, it takes care of the
76
76
dependencies. To install the server and associated configuration such as
77
77
` ClusterRole ` and ` Service ` resources, run:
78
78
79
- ``` bash
79
+ ``` bash copy
80
80
kubectl create ns kty && \
81
81
kty resources install -n kty
82
82
```
@@ -94,15 +94,15 @@ To clean these resources up, you can run `kty resources delete -n kty`.
94
94
Verify that this is up and running successfully by checking that the pod has
95
95
started up:
96
96
97
- ``` bash
97
+ ``` bash copy
98
98
kubectl -n kty rollout status deploy server
99
99
```
100
100
101
101
Once the pod has started up, you'll want to make sure there's an IP address that
102
102
can be reached. This will also add ` cluster.kty.dev ` to your ` /etc/hosts ` file
103
103
so that it is easy to get to the server in the future.
104
104
105
- ``` bash
105
+ ``` bash copy
106
106
kubectl -n kty get service server --output=jsonpath=' {.status.loadBalancer.ingress[0].ip}' \
107
107
| awk ' {print $1 " cluster.kty.dev"}' \
108
108
| sudo tee -a /etc/hosts
@@ -113,7 +113,7 @@ kubectl -n kty get service server --output=jsonpath='{.status.loadBalancer.ingre
113
113
If the load balancer isn't getting a public IP address, there's other ways to
114
114
connect to the server. You can port forward using ` kubectl ` :
115
115
116
- ``` bash
116
+ ``` bash copy
117
117
kubectl -n kty port-forward service/server 2222:2222
118
118
```
119
119
@@ -124,7 +124,7 @@ see what you can do with kty.
124
124
125
125
## Test it out
126
126
127
- ``` bash
127
+ ``` bash copy
128
128
ssh -p 2222 me@cluster.kty.dev
129
129
```
130
130
@@ -136,7 +136,7 @@ ssh -p 2222 me@cluster.kty.dev
136
136
137
137
- ` scp ` some files out of a container:
138
138
139
- ``` bash
139
+ ``` bash copy
140
140
scp -P 2222 me@cluster.kty.dev:/default/my-pod/etc/hosts /tmp
141
141
```
142
142
0 commit comments