Merge branch 'master' into task-cmd-arg
This commit is contained in:
@@ -44,9 +44,11 @@ metadata:
|
||||
|
||||
To configure the annotation via `kubectl`:
|
||||
|
||||
```shell{% raw %}
|
||||
```shell
|
||||
{% raw %}
|
||||
kubectl annotate ns <namespace> "net.beta.kubernetes.io/network-policy={\"ingress\": {\"isolation\": \"DefaultDeny\"}}"
|
||||
{% endraw %}```
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
See the [NetworkPolicy getting started guide](/docs/getting-started-guides/network-policy/walkthrough) for an example.
|
||||
|
||||
|
||||
@@ -226,7 +226,8 @@ Here is a toy example:
|
||||
|
||||
The message is recorded along with the other state of the last (i.e., most recent) termination:
|
||||
|
||||
```shell{% raw %}
|
||||
```shell
|
||||
{% raw %}
|
||||
$ kubectl create -f ./pod-w-message.yaml
|
||||
pod "pod-w-message" created
|
||||
$ sleep 70
|
||||
@@ -234,7 +235,8 @@ $ kubectl get pods/pod-w-message -o go-template="{{range .status.containerStatus
|
||||
Sleep expired
|
||||
$ kubectl get pods/pod-w-message -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.exitCode}}{{end}}"
|
||||
0
|
||||
{% endraw %}```
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
## What's next?
|
||||
|
||||
|
||||
@@ -59,12 +59,14 @@ On most providers, the pod IPs are not externally accessible. The easiest way to
|
||||
|
||||
Provided the pod IP is accessible, you should be able to access its http endpoint with wget on port 80:
|
||||
|
||||
```shell{% raw %}
|
||||
```shell
|
||||
{% raw %}
|
||||
$ kubectl run busybox --image=busybox --restart=Never --tty -i --generator=run-pod/v1 --env "POD_IP=$(kubectl get pod nginx -o go-template='{{.status.podIP}}')"
|
||||
u@busybox$ wget -qO- http://$POD_IP # Run in the busybox container
|
||||
u@busybox$ exit # Exit the busybox container
|
||||
$ kubectl delete pod busybox # Clean up the pod we created with "kubectl run"
|
||||
{% endraw %}```
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
Delete the pod by name:
|
||||
|
||||
|
||||
@@ -136,7 +136,8 @@ On most providers, the service IPs are not externally accessible. The easiest wa
|
||||
|
||||
Provided the service IP is accessible, you should be able to access its http endpoint with wget on the exposed port:
|
||||
|
||||
```shell{% raw %}
|
||||
```shell
|
||||
{% raw %}
|
||||
$ export SERVICE_IP=$(kubectl get service nginx-service -o go-template='{{.spec.clusterIP}}')
|
||||
$ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template='{{(index .spec.ports 0).port}}')
|
||||
$ echo "$SERVICE_IP:$SERVICE_PORT"
|
||||
@@ -144,7 +145,8 @@ $ kubectl run busybox --generator=run-pod/v1 --image=busybox --restart=Never --
|
||||
u@busybox$ wget -qO- http://$SERVICE_IP:$SERVICE_PORT # Run in the busybox container
|
||||
u@busybox$ exit # Exit the busybox container
|
||||
$ kubectl delete pod busybox # Clean up the pod we created with "kubectl run"
|
||||
{% endraw %}```
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
To delete the service by name:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user