*: don't create -f from http endpoints!

k8s.io didn't always have https. But, now we do. We should fix this
immediatly.
This commit is contained in:
Brandon Philips
2017-05-17 20:14:09 -07:00
parent 411ecca94d
commit 3b5bdc3f00
25 changed files with 43 additions and 43 deletions
@@ -35,7 +35,7 @@ a container that writes some text to standard output once per second.
To run this pod, use the following command: To run this pod, use the following command:
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml $ kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml
pod "counter" created pod "counter" created
``` ```
@@ -45,7 +45,7 @@ If you create the ReplicaSet and then view the Pod metadata, you can see
OwnerReferences field: OwnerReferences field:
```shell ```shell
kubectl create -f http://k8s.io/docs/concepts/abstractions/controllers/my-repset.yaml kubectl create -f https://k8s.io/docs/concepts/abstractions/controllers/my-repset.yaml
kubectl get pods --output=yaml kubectl get pods --output=yaml
``` ```
+2 -2
View File
@@ -115,14 +115,14 @@ repository, preferably in the same directory as your topic file.
In your topic, show this command: In your topic, show this command:
kubectl create -f http://k8s.io/<PATHFROMROOT> kubectl create -f https://k8s.io/<PATHFROMROOT>
where `<PATHFROMROOT>` is the path to the configuration file relative to root, where `<PATHFROMROOT>` is the path to the configuration file relative to root,
for example, `docs/tutorials/stateful-application/gce-volume.yaml`. for example, `docs/tutorials/stateful-application/gce-volume.yaml`.
Here's an example of a command that creates an API object from a configuration file: Here's an example of a command that creates an API object from a configuration file:
kubectl create -f http://k8s.io/docs/tutorials/stateful-application/gce-volume.yaml kubectl create -f https://k8s.io/docs/tutorials/stateful-application/gce-volume.yaml
For an example of a topic that uses this technique, see For an example of a topic that uses this technique, see
[Running a Single-Instance Stateful Application](/docs/tutorials/stateful-application/run-stateful-application/). [Running a Single-Instance Stateful Application](/docs/tutorials/stateful-application/run-stateful-application/).
@@ -47,7 +47,7 @@ directory of the nginx server.
Create the Pod and the two Containers: Create the Pod and the two Containers:
kubectl create -f http://k8s.io/docs/tasks/access-application-cluster/two-container-pod.yaml kubectl create -f https://k8s.io/docs/tasks/access-application-cluster/two-container-pod.yaml
View information about the Pod and the Containers: View information about the Pod and the Containers:
@@ -51,7 +51,7 @@ file for the backend Deployment:
Create the backend Deployment: Create the backend Deployment:
``` ```
kubectl create -f http://k8s.io/docs/tasks/access-application-cluster/hello.yaml kubectl create -f https://k8s.io/docs/tasks/access-application-cluster/hello.yaml
``` ```
View information about the backend Deployment: View information about the backend Deployment:
@@ -97,7 +97,7 @@ that have the labels `app: hello` and `tier: backend`.
Create the `hello` Service: Create the `hello` Service:
``` ```
kubectl create -f http://k8s.io/docs/tasks/access-application-cluster/hello-service.yaml kubectl create -f https://k8s.io/docs/tasks/access-application-cluster/hello-service.yaml
``` ```
At this point, you have a backend Deployment running, and you have a At this point, you have a backend Deployment running, and you have a
@@ -124,7 +124,7 @@ the Service uses the default load balancer of your cloud provider.
Create the frontend Deployment and Service: Create the frontend Deployment and Service:
``` ```
kubectl create -f http://k8s.io/docs/tasks/access-application-cluster/frontend.yaml kubectl create -f https://k8s.io/docs/tasks/access-application-cluster/frontend.yaml
``` ```
The output verifies that both resources were created: The output verifies that both resources were created:
@@ -29,7 +29,7 @@ for database debugging.
1. Create a pod: 1. Create a pod:
kubectl create -f http://k8s.io/docs/tasks/access-application-cluster/redis-master.yaml kubectl create -f https://k8s.io/docs/tasks/access-application-cluster/redis-master.yaml
The output of a successful command verifies that the pod was created: The output of a successful command verifies that the pod was created:
@@ -66,7 +66,7 @@ The cluster-admin wants to control the following resources:
Let's create a simple quota that controls object counts for those resource types in this namespace. Let's create a simple quota that controls object counts for those resource types in this namespace.
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/rq-object-counts.yaml --namespace=quota-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/rq-object-counts.yaml --namespace=quota-example
resourcequota "object-counts" created resourcequota "object-counts" created
``` ```
@@ -95,7 +95,7 @@ To limit the amount of compute resource that can be consumed in this namespace,
let's create a quota that tracks compute resources. let's create a quota that tracks compute resources.
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/rq-compute-resources.yaml --namespace=quota-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/rq-compute-resources.yaml --namespace=quota-example
resourcequota "compute-resources" created resourcequota "compute-resources" created
``` ```
@@ -183,7 +183,7 @@ do not specify `requests` or `limits` for `cpu` and `memory`.
So let's set some default values for the amount of `cpu` and `memory` a pod can consume: So let's set some default values for the amount of `cpu` and `memory` a pod can consume:
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/rq-limits.yaml --namespace=quota-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/rq-limits.yaml --namespace=quota-example
limitrange "limits" created limitrange "limits" created
$ kubectl describe limits limits --namespace=quota-example $ kubectl describe limits limits --namespace=quota-example
Name: limits Name: limits
@@ -258,9 +258,9 @@ Let's create a new namespace with two quotas to demonstrate this behavior:
```shell ```shell
$ kubectl create namespace quota-scopes $ kubectl create namespace quota-scopes
namespace "quota-scopes" created namespace "quota-scopes" created
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/rq-best-effort.yaml --namespace=quota-scopes $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/rq-best-effort.yaml --namespace=quota-scopes
resourcequota "best-effort" created resourcequota "best-effort" created
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/rq-not-best-effort.yaml --namespace=quota-scopes $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/rq-not-best-effort.yaml --namespace=quota-scopes
resourcequota "not-best-effort" created resourcequota "not-best-effort" created
$ kubectl describe quota --namespace=quota-scopes $ kubectl describe quota --namespace=quota-scopes
Name: best-effort Name: best-effort
@@ -53,7 +53,7 @@ limit-example Active 45s
Let's create a simple limit in our namespace. Let's create a simple limit in our namespace.
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/limits.yaml --namespace=limit-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/limits.yaml --namespace=limit-example
limitrange "mylimits" created limitrange "mylimits" created
``` ```
@@ -140,14 +140,14 @@ Note that our nginx container has picked up the namespace default CPU and memory
Let's create a pod that exceeds our allowed limits by having it have a container that requests 3 CPU cores. Let's create a pod that exceeds our allowed limits by having it have a container that requests 3 CPU cores.
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/invalid-pod.yaml --namespace=limit-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/invalid-pod.yaml --namespace=limit-example
Error from server: error when creating "http://k8s.io/docs/tasks/configure-pod-container/invalid-pod.yaml": Pod "invalid-pod" is forbidden: [Maximum cpu usage per Pod is 2, but limit is 3., Maximum cpu usage per Container is 2, but limit is 3.] Error from server: error when creating "http://k8s.io/docs/tasks/configure-pod-container/invalid-pod.yaml": Pod "invalid-pod" is forbidden: [Maximum cpu usage per Pod is 2, but limit is 3., Maximum cpu usage per Container is 2, but limit is 3.]
``` ```
Let's create a pod that falls within the allowed limit boundaries. Let's create a pod that falls within the allowed limit boundaries.
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/valid-pod.yaml --namespace=limit-example $ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/valid-pod.yaml --namespace=limit-example
pod "valid-pod" created pod "valid-pod" created
``` ```
@@ -44,7 +44,7 @@ for the `Pod`:
1. Create a Pod based on the YAML configuration file: 1. Create a Pod based on the YAML configuration file:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/cpu-ram.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/cpu-ram.yaml
1. Display information about the pod: 1. Display information about the pod:
@@ -63,7 +63,7 @@ a `disktype=ssd` label.
1. Use the configuration file to create a pod that will get scheduled on your 1. Use the configuration file to create a pod that will get scheduled on your
chosen node: chosen node:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/pod.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/pod.yaml
1. Verify that the pod is running on your chosen node: 1. Verify that the pod is running on your chosen node:
@@ -36,7 +36,7 @@ nginx gracefully. This is helpful if the Container is being terminated because o
Create the Pod: Create the Pod:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/lifecycle-events.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/lifecycle-events.yaml
Verify that the Container in the Pod is running: Verify that the Container in the Pod is running:
@@ -63,7 +63,7 @@ code. After 30 seconds, `cat /tmp/healthy` returns a failure code.
Create the Pod: Create the Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/exec-liveness.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/exec-liveness.yaml
``` ```
Within 30 seconds, view the Pod events: Within 30 seconds, view the Pod events:
@@ -164,7 +164,7 @@ checks will fail, and the kubelet will kill and restart the Container.
To try the HTTP liveness check, create a Pod: To try the HTTP liveness check, create a Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/http-liveness.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/http-liveness.yaml
``` ```
After 10 seconds, view Pod events to verify that liveness probes have failed and After 10 seconds, view Pod events to verify that liveness probes have failed and
@@ -72,7 +72,7 @@ read-write by a single Node.
Create the PersistentVolume: Create the PersistentVolume:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/task-pv-volume.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/task-pv-volume.yaml
View information about the PersistentVolume: View information about the PersistentVolume:
@@ -98,7 +98,7 @@ Here is the configuration file for the PersistentVolumeClaim:
Create the PersistentVolumeClaim: Create the PersistentVolumeClaim:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/task-pv-claim.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/task-pv-claim.yaml
After you create the PersistentVolumeClaim, the Kubernetes control plane looks After you create the PersistentVolumeClaim, the Kubernetes control plane looks
for a PersistentVolume that satisfies the claim's requirements. If the control for a PersistentVolume that satisfies the claim's requirements. If the control
@@ -138,7 +138,7 @@ is a volume.
Create the Pod: Create the Pod:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/task-pv-pod.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/task-pv-pod.yaml
Verify that the Container in the Pod is running; Verify that the Container in the Pod is running;
@@ -41,7 +41,7 @@ of the nginx server.
Create the Pod: Create the Pod:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/init-containers.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/init-containers.yaml
Verify that the nginx container is running: Verify that the nginx container is running:
@@ -35,7 +35,7 @@ restarts. Here is the configuration file for the Pod:
1. Create the Pod: 1. Create the Pod:
kubectl create -f http://k8s.io/docs/tasks/configure-pod-container/pod-redis.yaml kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/pod-redis.yaml
1. Verify that the Pod's Container is running, and then watch for changes to 1. Verify that the Pod's Container is running, and then watch for changes to
the Pod: the Pod:
@@ -37,7 +37,7 @@ the container starts.
1. Create a Pod based on the YAML configuration file: 1. Create a Pod based on the YAML configuration file:
kubectl create -f http://k8s.io/docs/tasks/debug-application-cluster/termination.yaml kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/termination.yaml
In the YAML file, in the `cmd` and `args` fields, you can see that the In the YAML file, in the `cmd` and `args` fields, you can see that the
container sleeps for 10 seconds and then writes "Sleep expired" to container sleeps for 10 seconds and then writes "Sleep expired" to
@@ -125,7 +125,7 @@ that writes out the value of a counter and the date once per
second, and runs indefinitely. Let's create this pod in the default namespace. second, and runs indefinitely. Let's create this pod in the default namespace.
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml
``` ```
You can observe the running pod: You can observe the running pod:
@@ -162,7 +162,7 @@ pod "counter" deleted
and then recreating it: and then recreating it:
```shell ```shell
$ kubectl create -f http://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml $ kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/counter-pod.yaml
pod "counter" created pod "counter" created
``` ```
@@ -42,7 +42,7 @@ file for the Pod defines a command and two arguments:
1. Create a Pod based on the YAML configuration file: 1. Create a Pod based on the YAML configuration file:
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/commands.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/commands.yaml
1. List the running Pods: 1. List the running Pods:
@@ -37,7 +37,7 @@ Pod:
1. Create a Pod based on the YAML configuration file: 1. Create a Pod based on the YAML configuration file:
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/envars.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/envars.yaml
1. List the running Pods: 1. List the running Pods:
@@ -59,7 +59,7 @@ fields of the Container in the Pod.
Create the Pod: Create the Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-volume.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/dapi-volume.yaml
``` ```
Verify that Container in the Pod is running: Verify that Container in the Pod is running:
@@ -168,7 +168,7 @@ should be stored in a file named `cpu_limit`.
Create the Pod: Create the Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-volume-resources.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/dapi-volume-resources.yaml
``` ```
Get a shell into the Container that is running in your Pod: Get a shell into the Container that is running in your Pod:
@@ -62,7 +62,7 @@ Container in the Pod.
Create the Pod: Create the Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-envars-pod.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/dapi-envars-pod.yaml
``` ```
Verify that the Container in the Pod is running: Verify that the Container in the Pod is running:
@@ -137,7 +137,7 @@ from Container fields.
Create the Pod: Create the Pod:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/inject-data-application/dapi-envars-container.yaml kubectl create -f https://k8s.io/docs/tasks/inject-data-application/dapi-envars-container.yaml
``` ```
Verify that the Container in the Pod is running: Verify that the Container in the Pod is running:
@@ -62,7 +62,7 @@ and a StatefulSet.
Create the ConfigMap from the following YAML configuration file: Create the ConfigMap from the following YAML configuration file:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/run-application/mysql-configmap.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-configmap.yaml
``` ```
{% include code.html language="yaml" file="mysql-configmap.yaml" ghlink="/docs/tutorials/run-application/mysql-configmap.yaml" %} {% include code.html language="yaml" file="mysql-configmap.yaml" ghlink="/docs/tutorials/run-application/mysql-configmap.yaml" %}
@@ -82,7 +82,7 @@ based on information provided by the StatefulSet controller.
Create the Services from the following YAML configuration file: Create the Services from the following YAML configuration file:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/run-application/mysql-services.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-services.yaml
``` ```
{% include code.html language="yaml" file="mysql-services.yaml" ghlink="/docs/tutorials/run-application/mysql-services.yaml" %} {% include code.html language="yaml" file="mysql-services.yaml" ghlink="/docs/tutorials/run-application/mysql-services.yaml" %}
@@ -108,7 +108,7 @@ writes.
Finally, create the StatefulSet from the following YAML configuration file: Finally, create the StatefulSet from the following YAML configuration file:
```shell ```shell
kubectl create -f http://k8s.io/docs/tasks/run-application/mysql-statefulset.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-statefulset.yaml
``` ```
{% include code.html language="yaml" file="mysql-statefulset.yaml" ghlink="/docs/tutorials/run-application/mysql-statefulset.yaml" %} {% include code.html language="yaml" file="mysql-statefulset.yaml" ghlink="/docs/tutorials/run-application/mysql-statefulset.yaml" %}
@@ -65,7 +65,7 @@ environments.
Create the persistent volume: Create the persistent volume:
``` ```
kubectl create -f http://k8s.io/docs/tasks/run-application/gce-volume.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/gce-volume.yaml
``` ```
@@ -88,7 +88,7 @@ for a secure solution.
1. Deploy the contents of the YAML file: 1. Deploy the contents of the YAML file:
kubectl create -f http://k8s.io/docs/tasks/run-application/mysql-deployment.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/mysql-deployment.yaml
1. Display information about the Deployment: 1. Display information about the Deployment:
@@ -49,7 +49,7 @@ a Deployment that runs the nginx:1.7.9 Docker image:
1. Create a Deployment based on the YAML file: 1. Create a Deployment based on the YAML file:
kubectl create -f http://k8s.io/docs/tasks/run-application/deployment.yaml kubectl create -f https://k8s.io/docs/tasks/run-application/deployment.yaml
1. Display information about the Deployment: 1. Display information about the Deployment:
@@ -101,7 +101,7 @@ Open a command terminal, and use
manifest. manifest.
```shell ```shell
kubectl create -f http://k8s.io/docs/tutorials/stateful-application/zookeeper.yaml kubectl create -f https://k8s.io/docs/tutorials/stateful-application/zookeeper.yaml
``` ```
This creates the `zk-headless` Headless Service, the `zk-config` ConfigMap, This creates the `zk-headless` Headless Service, the `zk-config` ConfigMap,