* 'master' of https://github.com/kubernetes/kubernetes.github.io:
  Replace the tab with 4 spaces in md files (#2797)
  fix link error
  Replace the tab with 4 spaces in html files
  hitting the `ClusterIP` from a pod (#2826)

# Conflicts:
#	docs/admin/accessing-the-api.md
#	docs/api-reference/extensions/v1beta1/definitions.html
#	docs/getting-started-guides/kubeadm.md
#	docs/user-guide/kubectl/index.md
This commit is contained in:
Andrew Chen
2017-03-23 00:19:33 -07:00
104 changed files with 9776 additions and 3212 deletions
+77 -77
View File
@@ -57,49 +57,49 @@ We can retrieve a lot more information about each of these pods using `kubectl d
```shell
$ kubectl describe pod nginx-deployment-1006230814-6winp
Name: nginx-deployment-1006230814-6winp
Namespace: default
Node: kubernetes-node-wul5/10.240.0.9
Start Time: Thu, 24 Mar 2016 01:39:49 +0000
Labels: app=nginx,pod-template-hash=1006230814
Status: Running
IP: 10.244.0.6
Controllers: ReplicaSet/nginx-deployment-1006230814
Name: nginx-deployment-1006230814-6winp
Namespace: default
Node: kubernetes-node-wul5/10.240.0.9
Start Time: Thu, 24 Mar 2016 01:39:49 +0000
Labels: app=nginx,pod-template-hash=1006230814
Status: Running
IP: 10.244.0.6
Controllers: ReplicaSet/nginx-deployment-1006230814
Containers:
nginx:
Container ID: docker://90315cc9f513c724e9957a4788d3e625a078de84750f244a40f97ae355eb1149
Image: nginx
Image ID: docker://6f62f48c4e55d700cf3eb1b5e33fa051802986b77b874cc351cce539e5163707
Port: 80/TCP
Container ID: docker://90315cc9f513c724e9957a4788d3e625a078de84750f244a40f97ae355eb1149
Image: nginx
Image ID: docker://6f62f48c4e55d700cf3eb1b5e33fa051802986b77b874cc351cce539e5163707
Port: 80/TCP
QoS Tier:
cpu: Guaranteed
memory: Guaranteed
cpu: Guaranteed
memory: Guaranteed
Limits:
cpu: 500m
memory: 128Mi
cpu: 500m
memory: 128Mi
Requests:
memory: 128Mi
cpu: 500m
State: Running
Started: Thu, 24 Mar 2016 01:39:51 +0000
Ready: True
Restart Count: 0
memory: 128Mi
cpu: 500m
State: Running
Started: Thu, 24 Mar 2016 01:39:51 +0000
Ready: True
Restart Count: 0
Environment Variables:
Conditions:
Type Status
Ready True
Type Status
Ready True
Volumes:
default-token-4bcbi:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-4bcbi
Type: Secret (a volume populated by a Secret)
SecretName: default-token-4bcbi
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
54s 54s 1 {default-scheduler } Normal Scheduled Successfully assigned nginx-deployment-1006230814-6winp to kubernetes-node-wul5
54s 54s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulling pulling image "nginx"
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulled Successfully pulled image "nginx"
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Created Created container with docker id 90315cc9f513
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Started Started container with docker id 90315cc9f513
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
54s 54s 1 {default-scheduler } Normal Scheduled Successfully assigned nginx-deployment-1006230814-6winp to kubernetes-node-wul5
54s 54s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulling pulling image "nginx"
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Pulled Successfully pulled image "nginx"
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Created Created container with docker id 90315cc9f513
53s 53s 1 {kubelet kubernetes-node-wul5} spec.containers{nginx} Normal Started Started container with docker id 90315cc9f513
```
Here you can see configuration information about the container(s) and Pod (labels, resource requirements, etc.), as well as status information about the container(s) and Pod (state, readiness, restart count, events, etc.)
@@ -132,35 +132,35 @@ To find out why the nginx-deployment-1370807587-fz9sd pod is not running, we can
```shell
$ kubectl describe pod nginx-deployment-1370807587-fz9sd
Name: nginx-deployment-1370807587-fz9sd
Namespace: default
Node: /
Labels: app=nginx,pod-template-hash=1370807587
Status: Pending
IP:
Controllers: ReplicaSet/nginx-deployment-1370807587
Name: nginx-deployment-1370807587-fz9sd
Namespace: default
Node: /
Labels: app=nginx,pod-template-hash=1370807587
Status: Pending
IP:
Controllers: ReplicaSet/nginx-deployment-1370807587
Containers:
nginx:
Image: nginx
Port: 80/TCP
Image: nginx
Port: 80/TCP
QoS Tier:
memory: Guaranteed
cpu: Guaranteed
memory: Guaranteed
cpu: Guaranteed
Limits:
cpu: 1
memory: 128Mi
cpu: 1
memory: 128Mi
Requests:
cpu: 1
memory: 128Mi
cpu: 1
memory: 128Mi
Environment Variables:
Volumes:
default-token-4bcbi:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-4bcbi
Type: Secret (a volume populated by a Secret)
SecretName: default-token-4bcbi
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1m 48s 7 {default-scheduler } Warning FailedScheduling pod (nginx-deployment-1370807587-fz9sd) failed to fit in any node
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1m 48s 7 {default-scheduler } Warning FailedScheduling pod (nginx-deployment-1370807587-fz9sd) failed to fit in any node
fit failure on node (kubernetes-node-6ta5): Node didn't have enough resource: CPU, requested: 1000, used: 1420, capacity: 2000
fit failure on node (kubernetes-node-wul5): Node didn't have enough resource: CPU, requested: 1000, used: 1100, capacity: 2000
```
@@ -270,34 +270,34 @@ kubernetes-node-st6x Ready 1h
kubernetes-node-unaj Ready 1h
$ kubectl describe node kubernetes-node-861h
Name: kubernetes-node-861h
Labels: kubernetes.io/hostname=kubernetes-node-861h
CreationTimestamp: Fri, 10 Jul 2015 14:32:29 -0700
Name: kubernetes-node-861h
Labels: kubernetes.io/hostname=kubernetes-node-861h
CreationTimestamp: Fri, 10 Jul 2015 14:32:29 -0700
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
Ready Unknown Fri, 10 Jul 2015 14:34:32 -0700 Fri, 10 Jul 2015 14:35:15 -0700 Kubelet stopped posting node status.
Addresses: 10.240.115.55,104.197.0.26
Type Status LastHeartbeatTime LastTransitionTime Reason Message
Ready Unknown Fri, 10 Jul 2015 14:34:32 -0700 Fri, 10 Jul 2015 14:35:15 -0700 Kubelet stopped posting node status.
Addresses: 10.240.115.55,104.197.0.26
Capacity:
cpu: 1
memory: 3800808Ki
pods: 100
cpu: 1
memory: 3800808Ki
pods: 100
Version:
Kernel Version: 3.16.0-0.bpo.4-amd64
OS Image: Debian GNU/Linux 7 (wheezy)
Container Runtime Version: docker://Unknown
Kubelet Version: v0.21.1-185-gffc5a86098dc01
Kube-Proxy Version: v0.21.1-185-gffc5a86098dc01
PodCIDR: 10.244.0.0/24
ExternalID: 15233045891481496305
Pods: (0 in total)
Namespace Name
Kernel Version: 3.16.0-0.bpo.4-amd64
OS Image: Debian GNU/Linux 7 (wheezy)
Container Runtime Version: docker://Unknown
Kubelet Version: v0.21.1-185-gffc5a86098dc01
Kube-Proxy Version: v0.21.1-185-gffc5a86098dc01
PodCIDR: 10.244.0.0/24
ExternalID: 15233045891481496305
Pods: (0 in total)
Namespace Name
Events:
FirstSeen LastSeen Count From SubobjectPath Reason Message
Fri, 10 Jul 2015 14:32:28 -0700 Fri, 10 Jul 2015 14:32:28 -0700 1 {kubelet kubernetes-node-861h} NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
Fri, 10 Jul 2015 14:32:30 -0700 Fri, 10 Jul 2015 14:32:30 -0700 1 {kubelet kubernetes-node-861h} NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
Fri, 10 Jul 2015 14:33:00 -0700 Fri, 10 Jul 2015 14:33:00 -0700 1 {kubelet kubernetes-node-861h} starting Starting kubelet.
Fri, 10 Jul 2015 14:33:02 -0700 Fri, 10 Jul 2015 14:33:02 -0700 1 {kubelet kubernetes-node-861h} NodeReady Node kubernetes-node-861h status is now: NodeReady
Fri, 10 Jul 2015 14:35:15 -0700 Fri, 10 Jul 2015 14:35:15 -0700 1 {controllermanager } NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
FirstSeen LastSeen Count From SubobjectPath Reason Message
Fri, 10 Jul 2015 14:32:28 -0700 Fri, 10 Jul 2015 14:32:28 -0700 1 {kubelet kubernetes-node-861h} NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
Fri, 10 Jul 2015 14:32:30 -0700 Fri, 10 Jul 2015 14:32:30 -0700 1 {kubelet kubernetes-node-861h} NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
Fri, 10 Jul 2015 14:33:00 -0700 Fri, 10 Jul 2015 14:33:00 -0700 1 {kubelet kubernetes-node-861h} starting Starting kubelet.
Fri, 10 Jul 2015 14:33:02 -0700 Fri, 10 Jul 2015 14:33:02 -0700 1 {kubelet kubernetes-node-861h} NodeReady Node kubernetes-node-861h status is now: NodeReady
Fri, 10 Jul 2015 14:35:15 -0700 Fri, 10 Jul 2015 14:35:15 -0700 1 {controllermanager } NodeNotReady Node kubernetes-node-861h status is now: NodeNotReady
$ kubectl get node kubernetes-node-861h -o yaml
+28 -28
View File
@@ -44,34 +44,34 @@ If you need help, just run `kubectl help` from the terminal window.
The following table includes short descriptions and the general syntax for all of the `kubectl` operations:
Operation | Syntax | Description
Operation | Syntax | Description
-------------------- | -------------------- | --------------------
`annotate` | `kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the annotations of one or more resources.
`api-versions` | `kubectl api-versions [flags]` | List the API versions that are available.
`apply` | `kubectl apply -f FILENAME [flags]`| Apply a configuration change to a resource from a file or stdin.
`attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | Attach to a running container either to view the output stream or interact with the container (stdin).
`autoscale` | `kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller.
`cluster-info` | `kubectl cluster-info [flags]` | Display endpoint information about the master and services in the cluster.
`config` | `kubectl config SUBCOMMAND [flags]` | Modifies kubeconfig files. See the individual subcommands for details.
`create` | `kubectl create -f FILENAME [flags]` | Create one or more resources from a file or stdin.
`delete` | `kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags]` | Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources.
`describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources.
`edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor.
`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod,
`explain` | `kubectl explain [--include-extended-apis=true] [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc.
`expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [----external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service.
`get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources.
`label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources.
`logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | Print the logs for a container in a pod.
`patch` | `kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags]` | Update one or more fields of a resource by using the strategic merge patch process.
`port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod.
`proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server.
`replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin.
`rolling-update` | `kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CONTAINER_IMAGE | -f NEW_CONTROLLER_SPEC) [flags]` | Perform a rolling update by gradually replacing the specified replication controller and its pods.
`run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [flags]` | Run a specified image on the cluster.
`scale` | `kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags]` | Update the size of the specified replication controller.
`stop` | `kubectl stop` | Deprecated: Instead, see `kubectl delete`.
`version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server.
`annotate` | `kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the annotations of one or more resources.
`api-versions` | `kubectl api-versions [flags]` | List the API versions that are available.
`apply` | `kubectl apply -f FILENAME [flags]`| Apply a configuration change to a resource from a file or stdin.
`attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | Attach to a running container either to view the output stream or interact with the container (stdin).
`autoscale` | `kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags]` | Automatically scale the set of pods that are managed by a replication controller.
`cluster-info` | `kubectl cluster-info [flags]` | Display endpoint information about the master and services in the cluster.
`config` | `kubectl config SUBCOMMAND [flags]` | Modifies kubeconfig files. See the individual subcommands for details.
`create` | `kubectl create -f FILENAME [flags]` | Create one or more resources from a file or stdin.
`delete` | `kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags]` | Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources.
`describe` | `kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags]` | Display the detailed state of one or more resources.
`edit` | `kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags]` | Edit and update the definition of one or more resources on the server by using the default editor.
`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | Execute a command against a container in a pod,
`explain` | `kubectl explain [--include-extended-apis=true] [--recursive=false] [flags]` | Get documentation of various resources. For instance pods, nodes, services, etc.
`expose` | `kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [----external-ip=external-ip-of-service] [--type=type] [flags]` | Expose a replication controller, service, or pod as a new Kubernetes service.
`get` | `kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags]` | List one or more resources.
`label` | `kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags]` | Add or update the labels of one or more resources.
`logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | Print the logs for a container in a pod.
`patch` | `kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags]` | Update one or more fields of a resource by using the strategic merge patch process.
`port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | Forward one or more local ports to a pod.
`proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | Run a proxy to the Kubernetes API server.
`replace` | `kubectl replace -f FILENAME` | Replace a resource from a file or stdin.
`rolling-update` | `kubectl rolling-update OLD_CONTROLLER_NAME ([NEW_CONTROLLER_NAME] --image=NEW_CONTAINER_IMAGE | -f NEW_CONTROLLER_SPEC) [flags]` | Perform a rolling update by gradually replacing the specified replication controller and its pods.
`run` | `kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [flags]` | Run a specified image on the cluster.
`scale` | `kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags]` | Update the size of the specified replication controller.
`stop` | `kubectl stop` | Deprecated: Instead, see `kubectl delete`.
`version` | `kubectl version [--client] [flags]` | Display the Kubernetes version running on the client and server.
Remember: For more about command operations, see the [kubectl](/docs/user-guide/kubectl) reference documentation.
@@ -79,7 +79,7 @@ Remember: For more about command operations, see the [kubectl](/docs/user-guide/
The following table includes a list of all the supported resource types and their abbreviated aliases:
Resource type | Abbreviated alias
Resource type | Abbreviated alias
-------------------- | --------------------
`certificatesigningrequests` |`csr`
`clusters` |
+92
View File
@@ -0,0 +1,92 @@
---
title: kubectl
---
## kubectl
kubectl controls the Kubernetes cluster manager
### Synopsis
kubectl controls the Kubernetes cluster manager.
Find more information at [https://github.com/kubernetes/kubernetes](https://github.com/kubernetes/kubernetes).
```
kubectl
```
### Options
```
--alsologtostderr log to standard error as well as files
--as string Username to impersonate for the operation
--certificate-authority string Path to a cert. file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--password string Password for basic authentication to the API server
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
--username string Username for basic authentication to the API server
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [kubectl annotate](kubectl_annotate.md) - Update the annotations on a resource
* [kubectl api-versions](kubectl_api-versions.md) - Print the supported API versions on the server, in the form of "group/version"
* [kubectl apply](kubectl_apply.md) - Apply a configuration to a resource by filename or stdin
* [kubectl attach](kubectl_attach.md) - Attach to a running container
* [kubectl autoscale](kubectl_autoscale.md) - Auto-scale a Deployment, ReplicaSet, or ReplicationController
* [kubectl certificate](kubectl_certificate.md) - Modify certificate resources.
* [kubectl cluster-info](kubectl_cluster-info.md) - Display cluster info
* [kubectl completion](kubectl_completion.md) - Output shell completion code for the given shell (bash or zsh)
* [kubectl config](kubectl_config.md) - Modify kubeconfig files
* [kubectl convert](kubectl_convert.md) - Convert config files between different API versions
* [kubectl cordon](kubectl_cordon.md) - Mark node as unschedulable
* [kubectl cp](kubectl_cp.md) - Copy files and directories to and from containers.
* [kubectl create](kubectl_create.md) - Create a resource by filename or stdin
* [kubectl delete](kubectl_delete.md) - Delete resources by filenames, stdin, resources and names, or by resources and label selector
* [kubectl describe](kubectl_describe.md) - Show details of a specific resource or group of resources
* [kubectl drain](kubectl_drain.md) - Drain node in preparation for maintenance
* [kubectl edit](kubectl_edit.md) - Edit a resource on the server
* [kubectl exec](kubectl_exec.md) - Execute a command in a container
* [kubectl explain](kubectl_explain.md) - Documentation of resources
* [kubectl expose](kubectl_expose.md) - Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
* [kubectl get](kubectl_get.md) - Display one or many resources
* [kubectl label](kubectl_label.md) - Update the labels on a resource
* [kubectl logs](kubectl_logs.md) - Print the logs for a container in a pod
* [kubectl options](kubectl_options.md) -
* [kubectl patch](kubectl_patch.md) - Update field(s) of a resource using strategic merge patch
* [kubectl port-forward](kubectl_port-forward.md) - Forward one or more local ports to a pod
* [kubectl proxy](kubectl_proxy.md) - Run a proxy to the Kubernetes API server
* [kubectl replace](kubectl_replace.md) - Replace a resource by filename or stdin
* [kubectl rolling-update](kubectl_rolling-update.md) - Perform a rolling update of the given ReplicationController
* [kubectl rollout](kubectl_rollout.md) - Manage a deployment rollout
* [kubectl run](kubectl_run.md) - Run a particular image on the cluster
* [kubectl scale](kubectl_scale.md) - Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
* [kubectl set](kubectl_set.md) - Set specific features on objects
* [kubectl taint](kubectl_taint.md) - Update the taints on one or more nodes
* [kubectl top](kubectl_top.md) - Display Resource (CPU/Memory/Storage) usage
* [kubectl uncordon](kubectl_uncordon.md) - Mark node as schedulable
* [kubectl version](kubectl_version.md) - Print the client and server version information
###### Auto generated by spf13/cobra on 13-Dec-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
+244 -244
View File
@@ -1,252 +1,252 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Demo of jQuery.scrollTo. Lightweight, cross-browser and highly customizable animated scrolling with jQuery, made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.min.js"></script>
<script type="text/javascript">
jQuery(function( $ ){
/**
* Demo binding and preparation, no need to read this part
*/
//borrowed from jQuery easing plugin
//http://gsgd.co.uk/sandbox/jquery.easing.php
$.easing.elasout = function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};
$('a.back').click(function() {
$(this).parents('div.pane').scrollTo(0, 800, { queue:true });
$(this).parents('div.section').find('span.message').text( this.title);
return false;
});
//just for the example, to stop the click on the links.
$('ul.links').click(function(e){
var link = e.target;
if (link.target === '_blank') {
return;
}
e.preventDefault();
link.blur();
if (link.title) {
$(this).parent().find('span.message').text(link.title);
}
});
// This one is important, many browsers don't reset scroll on refreshes
// Reset all scrollable panes to (0,0)
$('div.pane').scrollTo(0);
// Reset the screen to (0,0)
$.scrollTo(0);
// TOC, shows how to scroll the whole window
$('#toc a').click(function() {//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
$.scrollTo(this.hash, 1500, { easing:'elasout' });
$(this.hash).find('span.message').text(this.title);
return false;
});
// Target examples bindings
var $target = $('#pane-target');
$('#target-examples a').click(function() {
$target.stop(true);
});
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Demo of jQuery.scrollTo. Lightweight, cross-browser and highly customizable animated scrolling with jQuery, made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.min.js"></script>
<script type="text/javascript">
jQuery(function( $ ){
/**
* Demo binding and preparation, no need to read this part
*/
//borrowed from jQuery easing plugin
//http://gsgd.co.uk/sandbox/jquery.easing.php
$.easing.elasout = function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};
$('a.back').click(function() {
$(this).parents('div.pane').scrollTo(0, 800, { queue:true });
$(this).parents('div.section').find('span.message').text( this.title);
return false;
});
//just for the example, to stop the click on the links.
$('ul.links').click(function(e){
var link = e.target;
if (link.target === '_blank') {
return;
}
e.preventDefault();
link.blur();
if (link.title) {
$(this).parent().find('span.message').text(link.title);
}
});
// This one is important, many browsers don't reset scroll on refreshes
// Reset all scrollable panes to (0,0)
$('div.pane').scrollTo(0);
// Reset the screen to (0,0)
$.scrollTo(0);
// TOC, shows how to scroll the whole window
$('#toc a').click(function() {//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
$.scrollTo(this.hash, 1500, { easing:'elasout' });
$(this.hash).find('span.message').text(this.title);
return false;
});
// Target examples bindings
var $target = $('#pane-target');
$('#target-examples a').click(function() {
$target.stop(true);
});
$('#relative-selector').click(function() {
$target.scrollTo('li:eq(7)', 800);
});
$('#jquery-object').click(function() {
$target.scrollTo($('#pane-target li:eq(14)') , 800);
});
$('#dom-element').click(function() {
$target.scrollTo(document.getElementById('twenty'), 800);
});
$('#absolute-number').click(function() {
$target.scrollTo(150, 800);
});
$('#absolute-number-hash').click(function() {
$target.scrollTo({ top:800, left:700}, 800);
});
$('#absolute-px').click(function() {
$target.scrollTo('520px', 800);
});
$('#absolute-px-hash').click(function() {
$target.scrollTo({top:'110px', left:'290px'}, 800);
});
$('#relative-px').click(function() {
$target.scrollTo('+=100', 500);
});
$('#relative-px-hash').click(function() {
$target.scrollTo({top:'-=100px', left:'+=100'}, 500);
});
$('#percentage-px').click(function() {
$target.scrollTo('50%', 800);
});
$('#percentage-px-hash').click(function() {
$target.scrollTo({top:'50%', left:'20%'}, 800);
});
// Settings examples bindings, they will all scroll to the same place, with different settings
var $settings = $('#pane-settings');
$('#settings-examples a').click(function() {
// before each animation, reset to (0,0), skip this.
$settings.stop(true).scrollTo(0);
});
$('#settings-no').click(function() {
$settings.scrollTo('li:eq(15)', 1000);
});
$('#settings-axis').click(function() {// only scroll horizontally
$settings.scrollTo('li:eq(15)', 1000, { axis:'x' });
});
$('#settings-duration').click(function() {// it's the same as specifying it in the 2nd argument
$settings.scrollTo('li:eq(15)', { duration: 3000 });
});
$('#settings-easing').click(function() {
$settings.scrollTo('li:eq(15)', 2500, { easing:'elasout' });
});
$('#settings-margin').click(function() {//scroll to the "outer" position of the element
$settings.scrollTo('li:eq(15)', 1000, { margin:true });
});
$('#settings-offset').click(function() {//same as { top:-50, left:-50 }
$settings.scrollTo('li:eq(15)', 1000, { offset:-50 });
});
$('#settings-offset-hash').click(function() {
$settings.scrollTo('li:eq(15)', 1000, { offset:{ top:-5, left:-30 } });
});
$('#settings-offset-function').click(function() {
$settings.scrollTo('li:eq(15)', 1000, {offset: function() { return {top:-30, left:-5}; }});
});
$('#settings-over').click(function() {//same as { top:-50, left:-50 }
$settings.scrollTo('li:eq(15)', 1000, { over:0.5 });
});
$('#settings-over-hash').click(function() {
$settings.scrollTo('li:eq(15)', 1000, { over:{ top:0.2, left:-0.5 } });
});
$('#settings-interrupt').click(function() {
$settings.scrollTo('li:eq(15)', 10000, { interrupt:true });
});
$('#settings-queue').click(function() {//in this case, having 'axis' as 'xy' or 'yx' matters.
$settings.scrollTo('li:eq(15)', 2000, { queue:true });
});
$('#settings-onAfter').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {
onAfter:function() {
$('#settings-message').text('Got there!');
}
});
});
$('#settings-onAfterFirst').click(function() {//onAfterFirst exists only when queuing
$settings.scrollTo('li:eq(15)', 1600, {
queue:true,
onAfterFirst:function() {
$('#settings-message').text('Got there horizontally!');
},
onAfter:function() {
$('#settings-message').text('Got there vertically!');
}
});
});
$('#settings-step').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {step:function(now) {
$('#settings-message').text(now.toFixed(2));
}});
});
$('#settings-progress').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {progress:function(_, now) {
$('#settings-message').text(Math.round(now*100) + '%');
}});
});
$('#settings-fail').click(function() {
$settings.scrollTo('li:eq(15)', 10000, {interrupt:true, fail:function() {
$('#settings-message').text('Scroll interrupted!');
}});
});
});
</script>
$('#relative-selector').click(function() {
$target.scrollTo('li:eq(7)', 800);
});
$('#jquery-object').click(function() {
$target.scrollTo($('#pane-target li:eq(14)') , 800);
});
$('#dom-element').click(function() {
$target.scrollTo(document.getElementById('twenty'), 800);
});
$('#absolute-number').click(function() {
$target.scrollTo(150, 800);
});
$('#absolute-number-hash').click(function() {
$target.scrollTo({ top:800, left:700}, 800);
});
$('#absolute-px').click(function() {
$target.scrollTo('520px', 800);
});
$('#absolute-px-hash').click(function() {
$target.scrollTo({top:'110px', left:'290px'}, 800);
});
$('#relative-px').click(function() {
$target.scrollTo('+=100', 500);
});
$('#relative-px-hash').click(function() {
$target.scrollTo({top:'-=100px', left:'+=100'}, 500);
});
$('#percentage-px').click(function() {
$target.scrollTo('50%', 800);
});
$('#percentage-px-hash').click(function() {
$target.scrollTo({top:'50%', left:'20%'}, 800);
});
// Settings examples bindings, they will all scroll to the same place, with different settings
var $settings = $('#pane-settings');
$('#settings-examples a').click(function() {
// before each animation, reset to (0,0), skip this.
$settings.stop(true).scrollTo(0);
});
$('#settings-no').click(function() {
$settings.scrollTo('li:eq(15)', 1000);
});
$('#settings-axis').click(function() {// only scroll horizontally
$settings.scrollTo('li:eq(15)', 1000, { axis:'x' });
});
$('#settings-duration').click(function() {// it's the same as specifying it in the 2nd argument
$settings.scrollTo('li:eq(15)', { duration: 3000 });
});
$('#settings-easing').click(function() {
$settings.scrollTo('li:eq(15)', 2500, { easing:'elasout' });
});
$('#settings-margin').click(function() {//scroll to the "outer" position of the element
$settings.scrollTo('li:eq(15)', 1000, { margin:true });
});
$('#settings-offset').click(function() {//same as { top:-50, left:-50 }
$settings.scrollTo('li:eq(15)', 1000, { offset:-50 });
});
$('#settings-offset-hash').click(function() {
$settings.scrollTo('li:eq(15)', 1000, { offset:{ top:-5, left:-30 } });
});
$('#settings-offset-function').click(function() {
$settings.scrollTo('li:eq(15)', 1000, {offset: function() { return {top:-30, left:-5}; }});
});
$('#settings-over').click(function() {//same as { top:-50, left:-50 }
$settings.scrollTo('li:eq(15)', 1000, { over:0.5 });
});
$('#settings-over-hash').click(function() {
$settings.scrollTo('li:eq(15)', 1000, { over:{ top:0.2, left:-0.5 } });
});
$('#settings-interrupt').click(function() {
$settings.scrollTo('li:eq(15)', 10000, { interrupt:true });
});
$('#settings-queue').click(function() {//in this case, having 'axis' as 'xy' or 'yx' matters.
$settings.scrollTo('li:eq(15)', 2000, { queue:true });
});
$('#settings-onAfter').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {
onAfter:function() {
$('#settings-message').text('Got there!');
}
});
});
$('#settings-onAfterFirst').click(function() {//onAfterFirst exists only when queuing
$settings.scrollTo('li:eq(15)', 1600, {
queue:true,
onAfterFirst:function() {
$('#settings-message').text('Got there horizontally!');
},
onAfter:function() {
$('#settings-message').text('Got there vertically!');
}
});
});
$('#settings-step').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {step:function(now) {
$('#settings-message').text(now.toFixed(2));
}});
});
$('#settings-progress').click(function() {
$settings.scrollTo('li:eq(15)', 2000, {progress:function(_, now) {
$('#settings-message').text(Math.round(now*100) + '%');
}});
});
$('#settings-fail').click(function() {
$settings.scrollTo('li:eq(15)', 10000, {interrupt:true, fail:function() {
$('#settings-message').text('Scroll interrupted!');
}});
});
});
</script>
</head>
<body>
<h1>jQuery.scrollTo&nbsp;<strong>by Ariel Flesler</strong></h1>
<div id="toc" class="part">
<h3>Table of contents&nbsp;<strong>(try these)</strong></h3>
<ul>
<li><a title="$.scrollTo('#target-examples', 800, {easing:'elasout'});" href="#target-examples">Ways to specify the target</a></li>
<li><a title="$.scrollTo('#settings-examples', 800, {easing:'elasout'});" href="#settings-examples">Settings</a></li>
</ul>
</div>
<div id="links" class="part">
<h3>Links</h3>
<ul>
<li><a target="_blank" href="https://github.com/flesler/jquery.scrollTo">Github</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">Main blog article</a></li>
<li><a target="_blank" href="http://demos.flesler.com/jquery/localScroll/">LocalScroll Demo</a></li>
<li><a target="_blank" href="http://demos.flesler.com/jquery/serialScroll/">SerialScroll Demo</a></li>
<li><a target="_blank" href="index.old.html">Old Demo</a></li>
</ul>
</div>
<div id="target-examples" class="section part">
<h3>Ways to specify the target&nbsp;<span id="target-message" class="message">Click an option, to see it in action</span></h3>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(7)', 800);" id="relative-selector" href="#">Relative selector</a></li>
<li><a title="$(...).scrollTo($('div li:eq(14)'), 800);" id="jquery-object" href="#">jQuery object</a></li>
<li><a title="$(...).scrollTo(document.getElementById('twenty'), 800);" id="dom-element" href="#">DOM Element</a></li>
<li><a title="$(...).scrollTo(150, 800);" id="absolute-number" href="#">Absolute number</a></li>
<li><a title="$(...).scrollTo({ top:800, left:700}, 800);" id="absolute-number-hash" href="#">Absolute number(hash)</a></li>
</ul>
<ul class="links">
<li><a title="$(...).scrollTo('520px', 800);" id="absolute-px" href="#">Absolute px</a></li>
<li><a title="$(...).scrollTo({top:'110px', left:'290px'}, 800);" id="absolute-px-hash" href="#">Absolute px(hash)</a></li>
<li><a title="$(...).scrollTo('+=100px', 800);" id="relative-px" href="#">Relative px</a></li>
<li><a title="$(...).scrollTo({top:'-=100px', left:'+=100'}, 800);" id="relative-px-hash" href="#">Relative px(hash)</a></li>
<li><a title="$(...).scrollTo('50%', 800);" id="percentage-px" href="#">Percent</a></li>
<li><a title="$(...).scrollTo({top:'50%', left:'20%'}, 800);" id="percentage-px-hash" href="#">Percent(hash)</a></li>
</ul>
<div id="pane-target" class="pane">
<ul class="elements" style="height:1011px; width:1820px;">
<li><p>0</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>1</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>2</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>3</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>4</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>5</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>6</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>7</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>8</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>9</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>10</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>11</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>12</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>13</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>14</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>15</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>16</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>17</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>18</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>19</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li id="twenty"><p>20</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>21</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>22</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>23</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>24</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>25</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>26</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>27</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>28</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>29</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li>
</ul>
</div>
</div>
<div id="settings-examples" class="section part">
<h3>Settings&nbsp;<span id="settings-message" class="message">The examples shown here, are summarized for brevity</span></h3>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(15)', 1000);" id="settings-no" href="#">no settings</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {axis:'x'});//only scroll on this axis (can be x, y, xy or yx)" id="settings-axis" href="#">axis</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {margin:true});//deduct the margin and border from the final position" id="settings-margin" href="#">margin</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset:-50});//add or deduct from the final position" id="settings-offset" href="#">offset</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset: {top:-5, left:-30} });" id="settings-offset-hash" href="#">offset(hash)</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset: function() { return {top:-30, left:-5}; }});" id="settings-offset-function" href="#">offset(function)</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {over:0.5});//add or deduct a fraction of its height/width" id="settings-over" href="#">over</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {over:{top:0.2, left:-0.5});" id="settings-over-hash" href="#">over(hash)</a></li>
<li><a title="Scroll manually to interrupt the animation" id="settings-interrupt" href="#">interrupt</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {onAfter:function() { } });//called after the scrolling ends" id="settings-onAfter" href="#">onAfter</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {queue:true, onAfterFirst:function() { } });//called after the first axis scrolled" id="settings-onAfterFirst" href="#">onAfterFirst</a></li>
</ul>
<h4>Settings inherited from <a href="http://api.jquery.com/animate/#animate-properties-options" target="_blank">$().animate()</a></h4>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(15)', {duration:3000});//another way of calling the plugin" id="settings-duration" href="#">duration</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {easing:'elasout'});//specify an easing equation" id="settings-easing" href="#">easing</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {queue:true});//scroll one axis, then the other" id="settings-queue" href="#">queue</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {step:function() { }'});//specify a step function" id="settings-step" href="#">step</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {progress:function() { }'});//specify a progress function" id="settings-progress" href="#">progress</a></li>
<li><a title="Scroll manually to interrupt and trigger the callback" id="settings-fail" href="#">fail</a></li>
<li><a href="http://api.jquery.com/animate/#animate-properties-options" target="_blank">more</a></li>
</ul>
<div id="pane-settings" class="pane">
<ul class="elements" style="height:1062px;width:1877px;">
<li><p>0</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>1</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>2</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>3</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>4</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>5</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>6</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>7</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>8</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>9</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>10</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>11</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>12</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>13</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>14</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>15</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>16</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>17</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>18</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>19</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>20</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>21</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>22</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>23</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>24</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>25</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>26</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>27</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>28</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>29</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li>
</ul>
</div>
</div>
<h1>jQuery.scrollTo&nbsp;<strong>by Ariel Flesler</strong></h1>
<div id="toc" class="part">
<h3>Table of contents&nbsp;<strong>(try these)</strong></h3>
<ul>
<li><a title="$.scrollTo('#target-examples', 800, {easing:'elasout'});" href="#target-examples">Ways to specify the target</a></li>
<li><a title="$.scrollTo('#settings-examples', 800, {easing:'elasout'});" href="#settings-examples">Settings</a></li>
</ul>
</div>
<div id="links" class="part">
<h3>Links</h3>
<ul>
<li><a target="_blank" href="https://github.com/flesler/jquery.scrollTo">Github</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">Main blog article</a></li>
<li><a target="_blank" href="http://demos.flesler.com/jquery/localScroll/">LocalScroll Demo</a></li>
<li><a target="_blank" href="http://demos.flesler.com/jquery/serialScroll/">SerialScroll Demo</a></li>
<li><a target="_blank" href="index.old.html">Old Demo</a></li>
</ul>
</div>
<div id="target-examples" class="section part">
<h3>Ways to specify the target&nbsp;<span id="target-message" class="message">Click an option, to see it in action</span></h3>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(7)', 800);" id="relative-selector" href="#">Relative selector</a></li>
<li><a title="$(...).scrollTo($('div li:eq(14)'), 800);" id="jquery-object" href="#">jQuery object</a></li>
<li><a title="$(...).scrollTo(document.getElementById('twenty'), 800);" id="dom-element" href="#">DOM Element</a></li>
<li><a title="$(...).scrollTo(150, 800);" id="absolute-number" href="#">Absolute number</a></li>
<li><a title="$(...).scrollTo({ top:800, left:700}, 800);" id="absolute-number-hash" href="#">Absolute number(hash)</a></li>
</ul>
<ul class="links">
<li><a title="$(...).scrollTo('520px', 800);" id="absolute-px" href="#">Absolute px</a></li>
<li><a title="$(...).scrollTo({top:'110px', left:'290px'}, 800);" id="absolute-px-hash" href="#">Absolute px(hash)</a></li>
<li><a title="$(...).scrollTo('+=100px', 800);" id="relative-px" href="#">Relative px</a></li>
<li><a title="$(...).scrollTo({top:'-=100px', left:'+=100'}, 800);" id="relative-px-hash" href="#">Relative px(hash)</a></li>
<li><a title="$(...).scrollTo('50%', 800);" id="percentage-px" href="#">Percent</a></li>
<li><a title="$(...).scrollTo({top:'50%', left:'20%'}, 800);" id="percentage-px-hash" href="#">Percent(hash)</a></li>
</ul>
<div id="pane-target" class="pane">
<ul class="elements" style="height:1011px; width:1820px;">
<li><p>0</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>1</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>2</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>3</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>4</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>5</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>6</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>7</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>8</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>9</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>10</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>11</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>12</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>13</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>14</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>15</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>16</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>17</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>18</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>19</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li id="twenty"><p>20</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>21</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>22</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>23</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>24</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>25</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>26</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>27</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>28</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>29</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li>
</ul>
</div>
</div>
<div id="settings-examples" class="section part">
<h3>Settings&nbsp;<span id="settings-message" class="message">The examples shown here, are summarized for brevity</span></h3>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(15)', 1000);" id="settings-no" href="#">no settings</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {axis:'x'});//only scroll on this axis (can be x, y, xy or yx)" id="settings-axis" href="#">axis</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {margin:true});//deduct the margin and border from the final position" id="settings-margin" href="#">margin</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset:-50});//add or deduct from the final position" id="settings-offset" href="#">offset</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset: {top:-5, left:-30} });" id="settings-offset-hash" href="#">offset(hash)</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {offset: function() { return {top:-30, left:-5}; }});" id="settings-offset-function" href="#">offset(function)</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {over:0.5});//add or deduct a fraction of its height/width" id="settings-over" href="#">over</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1000, {over:{top:0.2, left:-0.5});" id="settings-over-hash" href="#">over(hash)</a></li>
<li><a title="Scroll manually to interrupt the animation" id="settings-interrupt" href="#">interrupt</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {onAfter:function() { } });//called after the scrolling ends" id="settings-onAfter" href="#">onAfter</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {queue:true, onAfterFirst:function() { } });//called after the first axis scrolled" id="settings-onAfterFirst" href="#">onAfterFirst</a></li>
</ul>
<h4>Settings inherited from <a href="http://api.jquery.com/animate/#animate-properties-options" target="_blank">$().animate()</a></h4>
<ul class="links">
<li><a title="$(...).scrollTo('li:eq(15)', {duration:3000});//another way of calling the plugin" id="settings-duration" href="#">duration</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {easing:'elasout'});//specify an easing equation" id="settings-easing" href="#">easing</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 1600, {queue:true});//scroll one axis, then the other" id="settings-queue" href="#">queue</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {step:function() { }'});//specify a step function" id="settings-step" href="#">step</a></li>
<li><a title="$(...).scrollTo('li:eq(15)', 2500, {progress:function() { }'});//specify a progress function" id="settings-progress" href="#">progress</a></li>
<li><a title="Scroll manually to interrupt and trigger the callback" id="settings-fail" href="#">fail</a></li>
<li><a href="http://api.jquery.com/animate/#animate-properties-options" target="_blank">more</a></li>
</ul>
<div id="pane-settings" class="pane">
<ul class="elements" style="height:1062px;width:1877px;">
<li><p>0</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>1</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>2</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>3</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>4</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>5</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>6</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>7</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>8</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>9</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>10</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>11</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>12</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>13</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>14</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>15</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>16</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>17</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>18</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>19</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>20</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>21</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>22</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>23</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>24</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>25</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>26</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>27</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>28</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li><li><p>29</p><a href="#" title="$(...).scrollTo(0, 800, {queue:true});" class="back">go back</a></li>
</ul>
</div>
</div>
</body>
</html>
+121 -121
View File
@@ -1,128 +1,128 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.ScrollTo</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Demo of jQuery.scrollTo. Lightweight, cross-browser and highly customizable animated scrolling with jQuery, made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
<link type="text/css" rel="stylesheet" href="css/style.old.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript">
jQuery(function( $ ){
//borrowed from jQuery easing plugin
//http://gsgd.co.uk/sandbox/jquery.easing.php
$.easing.elasout = function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};
$('button').click(function(){//this is not the cleanest way to do this, I'm just keeping it short.
var index = parseInt( $(this).prev('input').val() ) || 0;
var $c = $(this).parent().next();
$c.stop().scrollTo('li:eq('+index+')', {duration:2500, easing:'elasout',axis:$c.attr('id')});
});
$('#btn_screen').click(function(){
$.scrollTo( $('#txt_screen').val(), {duration:2500} );
});
$('div.container a').click(function(){
var $c = $(this).parents('.container');
$c.stop().scrollTo( 0, {duration:2000,axis:$c.attr('id'), queue:true} );
return false;
});
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.ScrollTo</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Demo of jQuery.scrollTo. Lightweight, cross-browser and highly customizable animated scrolling with jQuery, made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
<link type="text/css" rel="stylesheet" href="css/style.old.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript">
jQuery(function( $ ){
//borrowed from jQuery easing plugin
//http://gsgd.co.uk/sandbox/jquery.easing.php
$.easing.elasout = function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};
$('button').click(function(){//this is not the cleanest way to do this, I'm just keeping it short.
var index = parseInt( $(this).prev('input').val() ) || 0;
var $c = $(this).parent().next();
$c.stop().scrollTo('li:eq('+index+')', {duration:2500, easing:'elasout',axis:$c.attr('id')});
});
$('#btn_screen').click(function(){
$.scrollTo( $('#txt_screen').val(), {duration:2500} );
});
$('div.container a').click(function(){
var $c = $(this).parents('.container');
$c.stop().scrollTo( 0, {duration:2000,axis:$c.attr('id'), queue:true} );
return false;
});
});
</script>
</head>
<body>
<h1>jQuery.ScrollTo&nbsp;<strong>by Ariel Flesler</strong></h1>
<div id="links" class="part" style="width:135px">
<h3>Links</h3>
<ul>
<li><a target="_blank" href="http://plugins.jquery.com/project/ScrollTo">Project Page</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">Main blog article</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/search/label/jQuery.ScrollTo">All articles</a></li>
<li><a target="_blank" href="http://flesler.webs.com/jQuery.LocalScroll/">LocalScroll Demo</a></li>
<li><a target="_blank" href="http://flesler.webs.com/jQuery.SerialScroll/">SerialScroll Demo</a></li>
<li><a target="_blank" href="./" rel="prev" rev="next">New Demo</a></li>
</ul>
</div>
<label for="txt_screen">Scroll the window to <input id="txt_screen" type="text" value=".pane:eq(1)" /><input id="btn_screen" type="button" value="Scroll" /></label><br /><br />
<label>Scroll to the #<input type="text" value="3" /> element inside this container<button>Scroll</button></label>
<div id="y" class="container">
<ul>
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to top</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to top</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to top</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to top</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to top</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to top</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to top</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to top</a></li>
</ul>
</div>
<label>Scroll to the #<input type="text" value="3" /> element inside this container<button>Scroll</button></label>
<div id="x" class="container">
<ul style="width:4820px;">
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>8</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>9</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>10</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>11</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>12</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>13</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>14</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>15</p><a href="#">back to start</a></li>
</ul>
</div>
<label>Scroll to the #<input type="text" value="16" /> element inside this container<button>Scroll</button></label>
<div id="xy" class="container">
<ul style="width:1500px;">
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>8</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>9</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>10</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>11</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>12</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>13</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>14</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>15</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>16</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>17</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>18</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>19</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>20</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>21</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>22</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>23</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>24</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>25</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>26</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>27</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>28</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>29</p><a href="#">back to start</a></li>
</ul>
</div>
<div class="pane" style="background-color:#000000;margin-top:40px;"></div>
<div class="pane" style="background-color:#333333;"></div>
<div class="pane" style="background-color:#666666;"></div>
<div class="pane" style="background-color:#999999;"></div>
<div class="pane" style="background-color:#CCCCCC;"></div>
<h1>jQuery.ScrollTo&nbsp;<strong>by Ariel Flesler</strong></h1>
<div id="links" class="part" style="width:135px">
<h3>Links</h3>
<ul>
<li><a target="_blank" href="http://plugins.jquery.com/project/ScrollTo">Project Page</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">Main blog article</a></li>
<li><a target="_blank" href="http://flesler.blogspot.com/search/label/jQuery.ScrollTo">All articles</a></li>
<li><a target="_blank" href="http://flesler.webs.com/jQuery.LocalScroll/">LocalScroll Demo</a></li>
<li><a target="_blank" href="http://flesler.webs.com/jQuery.SerialScroll/">SerialScroll Demo</a></li>
<li><a target="_blank" href="./" rel="prev" rev="next">New Demo</a></li>
</ul>
</div>
<label for="txt_screen">Scroll the window to <input id="txt_screen" type="text" value=".pane:eq(1)" /><input id="btn_screen" type="button" value="Scroll" /></label><br /><br />
<label>Scroll to the #<input type="text" value="3" /> element inside this container<button>Scroll</button></label>
<div id="y" class="container">
<ul>
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to top</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to top</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to top</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to top</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to top</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to top</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to top</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to top</a></li>
</ul>
</div>
<label>Scroll to the #<input type="text" value="3" /> element inside this container<button>Scroll</button></label>
<div id="x" class="container">
<ul style="width:4820px;">
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>8</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>9</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>10</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>11</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>12</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>13</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>14</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>15</p><a href="#">back to start</a></li>
</ul>
</div>
<label>Scroll to the #<input type="text" value="16" /> element inside this container<button>Scroll</button></label>
<div id="xy" class="container">
<ul style="width:1500px;">
<li style="background-color:#9933CC;"><p>0</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>1</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>2</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>3</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>4</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>5</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>6</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>7</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>8</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>9</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>10</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>11</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>12</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>13</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>14</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>15</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>16</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>17</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>18</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>19</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>20</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>21</p><a href="#">back to start</a></li>
<li style="background-color:#FFFFCC;"><p>22</p><a href="#">back to start</a></li>
<li style="background-color:#00FF00;"><p>23</p><a href="#">back to start</a></li>
<li style="background-color:#9933CC;"><p>24</p><a href="#">back to start</a></li>
<li style="background-color:#FFCC99;"><p>25</p><a href="#">back to start</a></li>
<li style="background-color:#FF0000;"><p>26</p><a href="#">back to start</a></li>
<li style="background-color:#00FFCC;"><p>27</p><a href="#">back to start</a></li>
<li style="background-color:#663366;"><p>28</p><a href="#">back to start</a></li>
<li style="background-color:#CCCCFF;"><p>29</p><a href="#">back to start</a></li>
</ul>
</div>
<div class="pane" style="background-color:#000000;margin-top:40px;"></div>
<div class="pane" style="background-color:#333333;"></div>
<div class="pane" style="background-color:#666666;"></div>
<div class="pane" style="background-color:#999999;"></div>
<div class="pane" style="background-color:#CCCCCC;"></div>
</body>
</html>
@@ -1,21 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Element MaxY - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Element MaxY - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Element MaxY - Compat Mode</h1>
<div id="viewport" style="width:600px;height:500px;overflow: auto">
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
&nbsp;
</div>
</div>
<script type="text/javascript">
$('#viewport').test();
</script>
<h1>jQuery.scrollTo - Test Element MaxY - Compat Mode</h1>
<div id="viewport" style="width:600px;height:500px;overflow: auto">
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
&nbsp;
</div>
</div>
<script type="text/javascript">
$('#viewport').test();
</script>
</html>
@@ -1,20 +1,20 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Element MaxY - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Element MaxY - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Element MaxY - Quirks Mode</h1>
<div id="viewport" style="width:600px;height:500px;overflow: auto">
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
&nbsp;
</div>
</div>
<script type="text/javascript">
$('#viewport').test();
</script>
<h1>jQuery.scrollTo - Test Element MaxY - Quirks Mode</h1>
<div id="viewport" style="width:600px;height:500px;overflow: auto">
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
&nbsp;
</div>
</div>
<script type="text/javascript">
$('#viewport').test();
</script>
</html>
@@ -1,19 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY - Compat Mode</h1>
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
&nbsp;
</div>
<script type="text/javascript">
$(window).test();
</script>
<h1>jQuery.scrollTo - Test Window MaxY - Compat Mode</h1>
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
&nbsp;
</div>
<script type="text/javascript">
$(window).test();
</script>
</html>
@@ -1,18 +1,18 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY - Quirks Mode</h1>
<h1>jQuery.scrollTo - Test Window MaxY - Quirks Mode</h1>
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
&nbsp;
</div>
<script type="text/javascript">
$(window).test();
</script>
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
&nbsp;
</div>
<script type="text/javascript">
$(window).test();
</script>
</html>
@@ -1,20 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</h1>
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</h1>
<iframe src="WinMaxY-compat.html?notest" style="width:500px" /></iframe>
<script type="text/javascript">
setTimeout(function(){
$('iframe').test();
}, 1500 );
</script>
<iframe src="WinMaxY-compat.html?notest" style="width:500px" /></iframe>
<script type="text/javascript">
setTimeout(function(){
$('iframe').test();
}, 1500 );
</script>
</html>
@@ -1,19 +1,19 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</h1>
<iframe src="WinMaxY-quirks.html?notest" style="width:500px"></iframe>
<script type="text/javascript">
setTimeout(function(){
$('iframe').test();
}, 1500 );
</script>
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</h1>
<iframe src="WinMaxY-quirks.html?notest" style="width:500px"></iframe>
<script type="text/javascript">
setTimeout(function(){
$('iframe').test();
}, 1500 );
</script>
</html>
@@ -1,11 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</title>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</h1>
<iframe src="WinMaxY-compat.html" />
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</h1>
<iframe src="WinMaxY-compat.html" />
</html>
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</title>
</head>
<body>
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</h1>
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</h1>
<iframe src="WinMaxY-quirks.html" />
<iframe src="WinMaxY-quirks.html" />
</html>
+17 -17
View File
@@ -1,24 +1,24 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo Tests</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Tests for jQuery ScrollTo. Made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery.scrollTo Tests</title>
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
<meta name="description" content="Tests for jQuery ScrollTo. Made by Ariel Flesler." />
<meta name="robots" content="index,follow" />
</head>
<body>
<h1>jQuery.scrollTo Tests</h1>
<ul>
<li><a href="WinMaxY-compat.html">Max window scrolling (compat mode)</a></li>
<li><a href="WinMaxY-quirks.html">Max window scrolling (quirks mode)</a></li>
<li><a href="ElemMaxY-compat.html">Max element scrolling (compat mode)</a></li>
<li><a href="ElemMaxY-quirks.html">Max element scrolling (quirks mode)</a></li>
<li><a href="WinMaxY-with-iframe-compat.html">Max window scrolling, within an iframe (compat mode)</a></li>
<li><a href="WinMaxY-with-iframe-quirks.html">Max window scrolling, within an iframe (quirks mode)</a></li>
<li><a href="WinMaxY-to-iframe-compat.html">Max iframe scrolling from outside (compat mode)</a></li>
<li><a href="WinMaxY-to-iframe-quirks.html">Max iframe scrolling from outside (quirks mode)</a></li>
</ul>
<h1>jQuery.scrollTo Tests</h1>
<ul>
<li><a href="WinMaxY-compat.html">Max window scrolling (compat mode)</a></li>
<li><a href="WinMaxY-quirks.html">Max window scrolling (quirks mode)</a></li>
<li><a href="ElemMaxY-compat.html">Max element scrolling (compat mode)</a></li>
<li><a href="ElemMaxY-quirks.html">Max element scrolling (quirks mode)</a></li>
<li><a href="WinMaxY-with-iframe-compat.html">Max window scrolling, within an iframe (compat mode)</a></li>
<li><a href="WinMaxY-with-iframe-quirks.html">Max window scrolling, within an iframe (quirks mode)</a></li>
<li><a href="WinMaxY-to-iframe-compat.html">Max iframe scrolling from outside (compat mode)</a></li>
<li><a href="WinMaxY-to-iframe-quirks.html">Max iframe scrolling from outside (quirks mode)</a></li>
</ul>
</body>
</html>
+5 -5
View File
@@ -55,11 +55,11 @@ For jQuery to work in Node, a window with a document is required. Since no such
```js
require("jsdom").env("", function(err, window) {
if (err) {
console.error(err);
return;
}
if (err) {
console.error(err);
return;
}
var $ = require("jquery")(window);
var $ = require("jquery")(window);
});
```
@@ -1,8 +1,8 @@
<html lang="en">
<head>
<title>Awesome page</title>
<title>Awesome page</title>
</head>
<body>
hello world!
hello world!
</body>
</html>
@@ -1,8 +1,8 @@
<html lang="en">
<head>
<title>Other page</title>
<title>Other page</title>
</head>
<body>
hello there!
hello there!
</body>
</html>
+4 -4
View File
@@ -246,11 +246,11 @@ web-0 # apt-get update && apt-get install -y dnsutils
...
web-0 # nslookup -type=srv nginx.default
Server: 10.0.0.10
Address: 10.0.0.10#53
Server: 10.0.0.10
Address: 10.0.0.10#53
nginx.default.svc.cluster.local service = 10 50 0 web-1.ub.default.svc.cluster.local.
nginx.default.svc.cluster.local service = 10 50 0 web-0.ub.default.svc.cluster.local.
nginx.default.svc.cluster.local service = 10 50 0 web-1.ub.default.svc.cluster.local.
nginx.default.svc.cluster.local service = 10 50 0 web-0.ub.default.svc.cluster.local.
```
## Updating a PetSet
+12 -12
View File
@@ -55,20 +55,20 @@ create the defined ReplicaSet and the pods that it manages.
$ kubectl create -f frontend.yaml
replicaset "frontend" created
$ kubectl describe rs/frontend
Name: frontend
Namespace: default
Image(s): gcr.io/google_samples/gb-frontend:v3
Selector: tier=frontend,tier in (frontend)
Labels: app=guestbook,tier=frontend
Replicas: 3 current / 3 desired
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Name: frontend
Namespace: default
Image(s): gcr.io/google_samples/gb-frontend:v3
Selector: tier=frontend,tier in (frontend)
Labels: app=guestbook,tier=frontend
Replicas: 3 current / 3 desired
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
No volumes.
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-qhloh
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-dnjpy
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-9si5l
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-qhloh
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-dnjpy
1m 1m 1 {replicaset-controller } Normal SuccessfulCreate Created pod: frontend-9si5l
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
frontend-9si5l 1/1 Running 0 1m
+12 -16
View File
@@ -46,29 +46,25 @@ Check on the status of the ReplicationController using this command:
```shell
$ kubectl describe replicationcontrollers/nginx
Name: nginx
Namespace: default
Image(s): nginx
Selector: app=nginx
Labels: app=nginx
Replicas: 3 current / 3 desired
Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed
Name: nginx
Namespace: default
Image(s): nginx
Selector: app=nginx
Labels: app=nginx
Replicas: 3 current / 3 desired
Pods Status: 0 Running / 3 Waiting / 0 Succeeded / 0 Failed
Events:
FirstSeen LastSeen Count From
SubobjectPath Reason Message
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1
{replication-controller } SuccessfulCreate Created pod: nginx-qrm3m
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1
{replication-controller } SuccessfulCreate Created pod: nginx-3ntk0
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1
{replication-controller } SuccessfulCreate Created pod: nginx-4ok8v
FirstSeen LastSeen Count From SubobjectPath Reason Message
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1 {replication-controller } SuccessfulCreate Created pod: nginx-qrm3m
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1 {replication-controller } SuccessfulCreate Created pod: nginx-3ntk0
Thu, 24 Sep 2015 10:38:20 -0700 Thu, 24 Sep 2015 10:38:20 -0700 1 {replication-controller } SuccessfulCreate Created pod: nginx-4ok8v
```
Here, 3 pods have been made, but none are running yet, perhaps because the image is being pulled.
A little later, the same command may show:
```shell
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
```
To list all the pods that belong to the rc in a machine readable form, you can use a command like this:
+7 -7
View File
@@ -71,17 +71,17 @@ NAME TYPE DATA AGE
db-user-pass Opaque 2 51s
$ kubectl describe secrets/db-user-pass
Name: db-user-pass
Namespace: default
Labels: <none>
Annotations: <none>
Name: db-user-pass
Namespace: default
Labels: <none>
Annotations: <none>
Type: Opaque
Type: Opaque
Data
====
password.txt: 13 bytes
username.txt: 6 bytes
password.txt: 13 bytes
username.txt: 6 bytes
```
Note that neither `get` nor `describe` shows the contents of the file by default.