Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace shell with sh #11565

Merged
merged 1 commit into from
Jul 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster/addons/dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Supported environments offer the following config flags, which are used at
cluster turn-up to create the SkyDNS pods and configure the kubelets. For
example, see `cluster/gce/config-default.sh`.

```shell
```sh
ENABLE_CLUSTER_DNS=true
DNS_SERVER_IP="10.0.0.10"
DNS_DOMAIN="cluster.local"
Expand Down
8 changes: 4 additions & 4 deletions contrib/exec-healthz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The exec healthz server is a sidecar container meant to serve as a liveness-exec

### Run the healthz server directly on localhost:

```shell
```sh
$ make server
$ ./exechealthz -cmd "ls /tmp/test"
$ curl http://localhost:8080/healthz
Expand All @@ -20,7 +20,7 @@ ok
### Run the healthz server in a docker container:

The [docker daemon](https://docs.docker.com/userguide/) needs to be running on your host.
```shell
```sh
$ make container PREFIX=mycontainer/test
$ docker run -itP -p 8080:8080 mycontainer/test:0.0 -cmd "ls /tmp/test"
$ curl http://localhost:8080/healthz
Expand Down Expand Up @@ -67,7 +67,7 @@ Create a pod.json that looks like:
```

And run the pod on your cluster using kubectl:
```shell
```sh
$ kubectl create -f pod.json
pods/simple
$ kubectl get pods -o wide
Expand All @@ -76,7 +76,7 @@ simple 0/1 Pending 0 3s node
```

SSH into the node (note that the recommended way to access a server in a container is through a [service](../../docs/services.md), the example that follows is just to illustrate how the kubelet performs an http liveness probe):
```shell
```sh
node$ kubectl get pods simple -o json | grep podIP
"podIP": "10.1.0.2",

Expand Down
6 changes: 3 additions & 3 deletions examples/aws_ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ Create a volume in the same region as your node add your volume
information in the pod description file aws-ebs-web.yaml then create
the pod:

```shell
```sh
$ kubectl create -f examples/aws_ebs/aws-ebs-web.yaml
```

Add some data to the volume if is empty:

```shell
```sh
$ echo "Hello World" >& /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/{Region}/{Volume ID}/index.html
```

You should now be able to query your web server:

```shell
```sh
$ curl <Pod IP address>
$ Hello World
```
Expand Down
28 changes: 14 additions & 14 deletions examples/cluster-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This is a toy example demonstrating how to use kubernetes DNS.

This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](../../cluster/addons/dns/).

```shell
```sh
$ cd kubernetes
$ hack/dev-build-and-up.sh
```
Expand All @@ -48,14 +48,14 @@ $ hack/dev-build-and-up.sh

We'll see how cluster DNS works across multiple [namespaces](../../docs/user-guide/namespaces.md), first we need to create two namespaces:

```shell
```sh
$ kubectl create -f examples/cluster-dns/namespace-dev.yaml
$ kubectl create -f examples/cluster-dns/namespace-prod.yaml
```

Now list all namespaces:

```shell
```sh
$ kubectl get namespaces
NAME LABELS STATUS
default <none> Active
Expand All @@ -65,7 +65,7 @@ production name=production Active

For kubectl client to work with each namespace, we define two contexts:

```shell
```sh
$ kubectl config set-context dev --namespace=development --cluster=${CLUSTER_NAME} --user=${USER_NAME}
$ kubectl config set-context prod --namespace=production --cluster=${CLUSTER_NAME} --user=${USER_NAME}
```
Expand All @@ -76,22 +76,22 @@ You can view your cluster name and user name in kubernetes config at ~/.kube/con

Use the file [`examples/cluster-dns/dns-backend-rc.yaml`](dns-backend-rc.yaml) to create a backend server [replication controller](../../docs/user-guide/replication-controller.md) in each namespace.

```shell
```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-backend-rc.yaml
```

Once that's up you can list the pod in the cluster:

```shell
```sh
$ kubectl get rc
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
dns-backend dns-backend ddysher/dns-backend name=dns-backend 1
```

Now repeat the above commands to create a replication controller in prod namespace:

```shell
```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-backend-rc.yaml
$ kubectl get rc
Expand All @@ -104,22 +104,22 @@ dns-backend dns-backend ddysher/dns-backend name=dns-backend 1
Use the file [`examples/cluster-dns/dns-backend-service.yaml`](dns-backend-service.yaml) to create
a [service](../../docs/user-guide/services.md) for the backend server.

```shell
```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-backend-service.yaml
```

Once that's up you can list the service in the cluster:

```shell
```sh
$ kubectl get service dns-backend
NAME LABELS SELECTOR IP(S) PORT(S)
dns-backend <none> name=dns-backend 10.0.236.129 8000/TCP
```

Again, repeat the same process for prod namespace:

```shell
```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-backend-service.yaml
$ kubectl get service dns-backend
Expand All @@ -131,22 +131,22 @@ dns-backend <none> name=dns-backend 10.0.35.246 8000/TCP

Use the file [`examples/cluster-dns/dns-frontend-pod.yaml`](dns-frontend-pod.yaml) to create a client [pod](../../docs/user-guide/pods.md) in dev namespace. The client pod will make a connection to backend and exit. Specifically, it tries to connect to address `http://dns-backend.development.cluster.local:8000`.

```shell
```sh
$ kubectl config use-context dev
$ kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
```

Once that's up you can list the pod in the cluster:

```shell
```sh
$ kubectl get pods dns-frontend
NAME READY STATUS RESTARTS AGE
dns-frontend 0/1 ExitCode:0 0 1m
```

Wait until the pod succeeds, then we can see the output from the client pod:

```shell
```sh
$ kubectl logs dns-frontend
2015-05-07T20:13:54.147664936Z 10.0.236.129
2015-05-07T20:13:54.147721290Z Send request to: http://dns-backend.development.cluster.local:8000
Expand All @@ -158,7 +158,7 @@ Please refer to the [source code](images/frontend/client.py) about the log. Firs

If we switch to prod namespace with the same pod config, we'll see the same result, i.e. dns will resolve across namespace.

```shell
```sh
$ kubectl config use-context prod
$ kubectl create -f examples/cluster-dns/dns-frontend-pod.yaml
$ kubectl logs dns-frontend
Expand Down
2 changes: 1 addition & 1 deletion examples/https-nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ It uses an [nginx server block](http://wiki.nginx.org/ServerBlockExample) to ser

First generate a self signed rsa key and certificate that the server can use for TLS.

```shell
```sh
$ make keys secret KEY=/tmp/nginx.key CERT=/tmp/nginx.crt SECRET=/tmp/secret.json
```

Expand Down
34 changes: 17 additions & 17 deletions examples/mysql-wordpress-pd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ First, if you have not already done so:

Authenticate with gcloud and set the gcloud default project name to point to the project you want to use for your Kubernetes cluster:

```shell
```sh
gcloud auth login
gcloud config set project <project-name>
```

Next, start up a Kubernetes cluster:

```shell
```sh
wget -q -O - https://get.k8s.io | bash
```

Expand All @@ -76,13 +76,13 @@ We will create two disks: one for the mysql pod, and one for the wordpress pod.

First create the mysql disk.

```shell
```sh
gcloud compute disks create --size=20GB --zone=$ZONE mysql-disk
```

Then create the wordpress disk.

```shell
```sh
gcloud compute disks create --size=20GB --zone=$ZONE wordpress-disk
```

Expand Down Expand Up @@ -133,14 +133,14 @@ spec:
Note that we've defined a volume mount for `/var/lib/mysql`, and specified a volume that uses the persistent disk (`mysql-disk`) that you created.
Once you've edited the file to set your database password, create the pod as follows, where `<kubernetes>` is the path to your Kubernetes installation:

```shell
```sh
$ kubectl create -f examples/mysql-wordpress-pd/mysql.yaml
```

It may take a short period before the new pod reaches the `Running` state.
List all pods to see the status of this new pod and the cluster node that it is running on:

```shell
```sh
$ kubectl get pods
```

Expand All @@ -149,7 +149,7 @@ $ kubectl get pods

You can take a look at the logs for a pod by using `kubectl.sh log`. For example:

```shell
```sh
$ kubectl logs mysql
```

Expand Down Expand Up @@ -182,13 +182,13 @@ spec:

Start the service like this:

```shell
```sh
$ kubectl create -f examples/mysql-wordpress-pd/mysql-service.yaml
```

You can see what services are running via:

```shell
```sh
$ kubectl get services
```

Expand Down Expand Up @@ -232,14 +232,14 @@ spec:

Create the pod:

```shell
```sh
$ kubectl create -f examples/mysql-wordpress-pd/wordpress.yaml
```

And list the pods to check that the status of the new pod changes
to `Running`. As above, this might take a minute.

```shell
```sh
$ kubectl get pods
```

Expand Down Expand Up @@ -271,13 +271,13 @@ Note also that we've set the service port to 80. We'll return to that shortly.

Start the service:

```shell
```sh
$ kubectl create -f examples/mysql-wordpress-pd/wordpress-service.yaml
```

and see it in the list of services:

```shell
```sh
$ kubectl get services
```

Expand All @@ -289,7 +289,7 @@ $ kubectl get services/wpfrontend --template="{{range .status.loadBalancer.ingre

or by listing the forwarding rules for your project:

```shell
```sh
$ gcloud compute forwarding-rules list
```

Expand All @@ -299,7 +299,7 @@ Look for the rule called `wpfrontend`, which is what we named the wordpress serv

To access your new installation, you first may need to open up port 80 (the port specified in the wordpress service config) in the firewall for your cluster. You can do this, e.g. via:

```shell
```sh
$ gcloud compute firewall-rules create sample-http --allow tcp:80
```

Expand All @@ -320,7 +320,7 @@ Set up your WordPress blog and play around with it a bit. Then, take down its p

If you are just experimenting, you can take down and bring up only the pods:

```shell
```sh
$ kubectl delete -f examples/mysql-wordpress-pd/wordpress.yaml
$ kubectl delete -f examples/mysql-wordpress-pd/mysql.yaml
```
Expand All @@ -331,7 +331,7 @@ If you want to shut down the entire app installation, you can delete the service

If you are ready to turn down your Kubernetes cluster altogether, run:

```shell
```sh
$ cluster/kube-down.sh
```

Expand Down
Loading