Skip to content

Commit 758c99e

Browse files
authored
Merge pull request #48 from JuliaComputing/tan/misc
few minor updates to docs [ci-skip]
2 parents ea91c01 + cb3299d commit 758c99e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

WalkThrough.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ julia> result
180180
Or we can access it like a regular Julia type and look at individual fields:
181181
```julia
182182
julia> for item in result.items
183-
println(item.metadata.name, " ", item.conditions[1]._type, " => ", item.conditions[1].status)
183+
println(item.metadata.name, " ", item.conditions[1].type, " => ", item.conditions[1].status)
184184
end
185185
controller-manager Healthy => False
186186
scheduler Healthy => False
@@ -191,7 +191,7 @@ Notice that APIs that fetch a list, have the entities in a field named `item`, a
191191

192192
```julia
193193
julia> collect(item.metadata.name for item in (get(ctx, :Namespace)).items)
194-
3-element Array{String,1}:
194+
3-element Vector{String}:
195195
"default"
196196
"kube-public"
197197
"kube-system"
@@ -201,16 +201,16 @@ And similarly a list of pods:
201201

202202
```julia
203203
julia> collect(item.metadata.name for item in (get(ctx, :Pod)).items)
204-
0-element Array{Any,1}
204+
Any[]
205205
```
206206

207207
We do not have any pods in the default namespace yet, because we have not started any! But we must have some system pods running in the "kube-system" namespace. We can switch namespaces and look into the "kube-system" namespace:
208208

209209
```julia
210-
julia> set_ns(ctx, "kube-system")
210+
julia> set_ns(ctx, "kube-system");
211211

212212
julia> collect(item.metadata.name for item in (get(ctx, :Pod)).items)
213-
9-element Array{String,1}:
213+
9-element Vector{String}:
214214
"heapster-779db6bd48-pbclv"
215215
"kube-dns-v20-b8ff799f7-fjtw9"
216216
"kube-dns-v20-b8ff799f7-mhdkp"
@@ -225,6 +225,8 @@ julia> collect(item.metadata.name for item in (get(ctx, :Pod)).items)
225225
There! Now let's get back to the default namespace and start something of our own. How about a nginx webserver that we can access over the internet? Kubernetes entities can be created from their JSON specification with the `kuber_obj` utility API provided with Kuber.jl.
226226

227227
```julia
228+
julia> set_ns(ctx, "default");
229+
228230
julia> nginx_pod = kuber_obj(ctx, """{
229231
"kind": "Pod",
230232
"apiVersion": "v1",
@@ -260,7 +262,7 @@ julia> nginx_service = kuber_obj(ctx, """{
260262
"ports": [{"port": 80}],
261263
"selector": {"name": "nginx-pod"}
262264
}
263-
}""")
265+
}""");
264266

265267
julia> typeof(nginx_service)
266268
Kuber.ApiImpl.Kubernetes.IoK8sApiCoreV1Service
@@ -272,7 +274,7 @@ To create the pod in the cluster, use the `put!` API. And we should see it when
272274
julia> result = put!(ctx, nginx_pod);
273275

274276
julia> collect(item.metadata.name for item in get(ctx, :Pod).items)
275-
1-element Array{String,1}:
277+
1-element Vector{String}:
276278
"nginx-pod"
277279
```
278280

0 commit comments

Comments
 (0)