diff --git a/_includes/partner-script.js b/_includes/partner-script.js index 39357ab2fa..d90cc040d0 100644 --- a/_includes/partner-script.js +++ b/_includes/partner-script.js @@ -432,7 +432,7 @@ name: 'Kublr', logo: 'kublr', link: 'http://kublr.com', - blurb: 'SSimplify and speed up the management of your containerized applications at scale.' + blurb: 'Simplify and speed up the management of your containerized applications at scale.' }, { type: 0, @@ -614,7 +614,7 @@ name: 'Sphere Software, LLC', logo: 'spheresoftware', link: 'https://sphereinc.com/kubernetes/', - blurb: 'Architect and implement scalable applications using Kubernetes in Google Cloud, AWS, and Azure with our team of experts.' + blurb: 'The Sphere Software team of experts allows customers to architect and implement scalable applications using Kubernetes in Google Cloud, AWS, and Azure.' }, { type: 1, @@ -742,6 +742,13 @@ link: 'https://caicloud.io/products/compass', blurb: 'Caicloud - Compass' }, + { + type: 2, + name: 'Caicloud', + logo: 'caicloud', + link: 'https://caicloud.io/', + blurb: 'Founded by ex-Googlers,and early Kubernetes contributors, Caicloud leverages Kubernetes to provide container products which have successfully served Fortune 500 enterprises, and further utilizes Kubernetes as a vehicle to deliver ultra-speed deep learning experience.' + }, { type: 3, name: 'Alibaba', @@ -788,7 +795,7 @@ type: 3, name: 'Loodse', logo: 'loodse', - link: 'https://loodse.io', + link: 'https://loodse.com', blurb: 'Loodse - Kubermatic Container Engine' }, { @@ -798,6 +805,13 @@ link: 'https://github.com/Azure/acs-engine', blurb: 'Microsoft - Azure acs-engine' }, + { + type: 3, + name: 'Microsoft', + logo: 'microsoft', + link: 'https://docs.microsoft.com/en-us/azure/aks/', + blurb: 'Microsoft - Azure Container Service AKS' + }, { type: 3, name: 'Oracle', @@ -910,6 +924,20 @@ link: 'https://gopaddle.io', blurb: 'goPaddle is a DevOps platform for Kubernetes developers. It simplifies the Kubernetes Service creation and maintenance through source to image conversion, build & version management, team management, access controls and audit logs, single click provision of Kubernetes Clusters across multiple clouds from a single console.' }, + { + type: 0, + name: 'Vexxhost', + logo: 'vexxhost', + link: 'https://vexxhost.com/public-cloud/container-services/kubernetes/', + blurb: 'VEXXHOST offers a high-performance container management service powered by Kubernetes and OpenStack Magnum.' + }, + { + type: 1, + name: 'Component Soft', + logo: 'componentsoft', + link: 'https://www.componentsoft.eu/?p=3925', + blurb: 'Component Soft offers training, consultation and support around open cloud technologies like Kubernetes, Docker, Openstack and Ceph.' + }, { type: 0, name: 'Datera', @@ -945,6 +973,41 @@ link: 'https://docs.portworx.com/scheduler/kubernetes/install.html', blurb: 'With Portworx, you can manage any database or stateful service on any infrastructure using Kubernetes. You get a single data management layer for all of your stateful services, no matter where they run.' }, + { + type: 1, + name: 'Object Computing, Inc.', + logo: 'objectcomputing', + link: 'https://objectcomputing.com/services/software-engineering/devops/kubernetes-services', + blurb: 'Our portfolio of DevOps consulting services includes Kubernetes support, development, and training.' + }, + { + type: 1, + name: 'Isotoma', + logo: 'isotoma', + link: 'https://www.isotoma.com/blog/2017/10/24/containerisation-tips-for-using-kubernetes-with-aws/', + blurb: 'Based in the North of England, Amazon partners who are delivering Kubernetes solutions on AWS for replatforming and native development.' + }, + { + type: 1, + name: 'Servian', + logo: 'servian', + link: 'https://www.servian.com/cloud-and-technology/', + blurb: 'Based in Australia, Servian provides advisory, consulting and managed services to support both application and data centric kubernetes use cases.' + }, + { + type: 1, + name: 'Redzara', + logo: 'redzara', + link: 'http://redzara.com/cloud-service', + blurb: 'Redzara has wide and in-depth experience in Cloud automation, now taking one giant step by providing container service offering and services to our customers.' + }, + { + type: 0, + name: 'Dataspine', + logo: 'dataspine', + link: 'http://dataspine.xyz/', + blurb: 'Dataspine is building a secure, elastic and serverless deployment platform for production ML/AI workloads on top of k8s.' + }, { type: 0, name: 'Logdna', diff --git a/cn/docs/concepts/workloads/controllers/garbage-collection.md b/cn/docs/concepts/workloads/controllers/garbage-collection.md index 1d8a921490..c9af3905b7 100644 --- a/cn/docs/concepts/workloads/controllers/garbage-collection.md +++ b/cn/docs/concepts/workloads/controllers/garbage-collection.md @@ -45,7 +45,7 @@ Kubernetes 垃圾收集器的角色是删除指定的对象,这些对象曾经 如果创建该 ReplicaSet,然后查看 Pod 的 metadata 字段,能够看到 OwnerReferences 字段: ```shell -kubectl create -f https://k8s.io/docs/concepts/abstractions/controllers/my-repset.yaml +kubectl create -f https://k8s.io/docs/concepts/controllers/my-repset.yaml kubectl get pods --output=yaml ``` diff --git a/cn/docs/reference/labels-annotations-taints.md b/cn/docs/reference/labels-annotations-taints.md new file mode 100644 index 0000000000..fbeffb9587 --- /dev/null +++ b/cn/docs/reference/labels-annotations-taints.md @@ -0,0 +1,104 @@ +--- +title: 知名标签(Label)、注解(Annotation)和 Taints +--- + +Kubernetes 保留了 kubernetes.io 名字空间下的所有标签和注解。 本文描述了知名的 +kubernetes.io 标签和注解。 + +本文既作为这些标签和注解值的参考,也就这些标签和注解的赋值进行了说明。 + +**目录:** + + +- [知名标签、注解和 Taints](#well-known-labels-annotations-and-taints) + - [beta.kubernetes.io/arch](#betakubernetesioarch) + - [beta.kubernetes.io/os](#betakubernetesioos) + - [kubernetes.io/hostname](#kubernetesiohostname) + - [beta.kubernetes.io/instance-type](#betakubernetesioinstance-type) + - [failure-domain.beta.kubernetes.io/region](#failure-domainbetakubernetesioregion) + - [failure-domain.beta.kubernetes.io/zone](#failure-domainbetakubernetesiozone) + + + + +## beta.kubernetes.io/arch + +示例:`beta.kubernetes.io/arch=amd64` + +用于:节点 + +Kubelet 用 Go 中定义的 `runtime.GOARCH` 值来填充该标签。 这在诸如混用 arm 和 x86 节点的情况下很有用。 + +## beta.kubernetes.io/os + +示例:`beta.kubernetes.io/os=linux` + +用于:节点 + +Kubelet 用该 Go 中定义的 `runtime.GOOS` 值来填充该标签。 这在集群中存在不同操作系统的节点时很有用(尽管当前 Kubernetes 只支持 Linux 操作系统)。 + +## kubernetes.io/hostname + +示例:`kubernetes.io/hostname=ip-172-20-114-199.ec2.internal` + +用于:节点 + +Kubelet 用 hostname 值来填充该标签。 注意:可以通过向 kubelet 传入 `--hostname-override` +参数对 “真正的” hostname 进行修改。 + +## beta.kubernetes.io/instance-type + +示例:`beta.kubernetes.io/instance-type=m3.medium` + +用于:节点 + +Kubelet 用 `cloudprovider` 中定义的实例类型来填充该标签。 未使用 `cloudprovider` 时不会设置该标签。 +该标签在想要将某些负载定向到特定实例类型的节点上时会很有用,但通常用户更希望依赖 Kubernetes 调度器来执行基于资源的调度,所以用户应该致力于基于属性而不是实例类型来进行调度(例如:需要一个 CPU,而不是 `g2.2xlarge`)。 + + +## failure-domain.beta.kubernetes.io/region + +参考 [failure-domain.beta.kubernetes.io/zone](#failure-domainbetakubernetesiozone). + +## failure-domain.beta.kubernetes.io/zone + +示例: + +`failure-domain.beta.kubernetes.io/region=us-east-1` + +`failure-domain.beta.kubernetes.io/zone=us-east-1c` + +用于:节点、PersistentVolume + +用于节点: Kubelet 用 `cloudprovider` 中定义的区域(zone)信息来填充该标签。 未使用 `cloudprovider` +时不会设置该标签,但如果该标签在你的拓扑中有意义的话,应该考虑设置。 + +用于 PersistentVolume:在 GCE 和 AWS 中,`PersistentVolumeLabel` 准入控制器会自动添加区域标签。 + +在单区的集群中,Kubernetes 会自动将同一副本控制器或服务下的 pod 分散到不同的节点上 (以降低故障的影响)。 +在多区的集群中,这种分散的行为扩展到跨区的层面 (以降低区域故障的影响)。 跨区分散通过 SelectorSpreadPriority +来实现。 + +这是一种尽力而为(best-effort)的处置方式, 如果集群中的区域是异构的 (例如:不同区域之间的节点数量、 +节点类型或 pod 资源需求不同),可能使得 pod 在各区域间无法均匀分布。 如有需要,用户可以使用同质的区域 +(节点数量和类型相同) 来减小 pod 分布不均的可能性。 + +由于卷不能跨区域挂载(attach),调度器 (通过 VolumeZonePredicate 断言) 也会保证需要特定卷的 pod +被调度到卷所在的区域中。 + + +区域和地域(region)的实际值无关紧要,两者的层次含义也没有严格的定义。 最终期望是,除非整个地域故障, +否则某一区域节点的故障不应该影响到其他区域的节点。 例如,通常区域间应该避免共用同一个网络交换机。 +具体的规划取决于特定的基础设备—— three-rack 设备所选择的设置与多数据中心截然不同。 + +如果 `PersistentVolumeLabel` 准入控制器不支持自动为 PersistentVolume 打标签,且用户希望防止 pod +跨区域进行卷的挂载,应考虑手动打标签 (或对 `PersistentVolumeLabel` 增加支持)。 如果用户的基础设施没有这种约束,则不需要为卷添加区域标签。 + + + + + + + +[![分析](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/api-reference/labels-annotations-taints.md?pixel)]() + diff --git a/community/index.html b/community/index.html index 6ade8ae9dd..e78541e9e4 100644 --- a/community/index.html +++ b/community/index.html @@ -7,7 +7,7 @@ cid: community

Community

-KubeConNA +KubeConNA
diff --git a/docs/admin/authorization/webhook.md b/docs/admin/authorization/webhook.md index a0ba0f8e38..f451a0d569 100644 --- a/docs/admin/authorization/webhook.md +++ b/docs/admin/authorization/webhook.md @@ -31,8 +31,10 @@ A configuration example which uses HTTPS client auth: clusters: - name: name-of-remote-authz-service cluster: - certificate-authority: /path/to/ca.pem # CA for verifying the remote service. - server: https://authz.example.com/authorize # URL of remote service to query. Must use 'https'. + # CA for verifying the remote service. + certificate-authority: /path/to/ca.pem + # URL of remote service to query. Must use 'https'. May not include parameters. + server: https://authz.example.com/authorize # users refers to the API Server's webhook configuration. users: diff --git a/docs/admin/daemon.yaml b/docs/admin/daemon.yaml deleted file mode 100644 index c5cd14a592..0000000000 --- a/docs/admin/daemon.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - name: prometheus-node-exporter -spec: - template: - metadata: - name: prometheus-node-exporter - labels: - daemon: prom-node-exp - spec: - containers: - - name: c - image: prom/prometheus - ports: - - containerPort: 9090 - hostPort: 9090 - name: serverport diff --git a/docs/admin/high-availability/kube-scheduler.yaml b/docs/admin/high-availability/kube-scheduler.yaml index 9e997cbc47..40c863da48 100644 --- a/docs/admin/high-availability/kube-scheduler.yaml +++ b/docs/admin/high-availability/kube-scheduler.yaml @@ -21,9 +21,6 @@ spec: volumeMounts: - mountPath: /var/log/kube-scheduler.log name: logfile - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - name: default-token-s8ejd - readOnly: true volumes: - hostPath: path: /var/log/kube-scheduler.log diff --git a/docs/admin/multiple-schedulers/pod1.yaml b/docs/admin/multiple-schedulers/pod1.yaml index 733aa97d99..6cf8fec25a 100644 --- a/docs/admin/multiple-schedulers/pod1.yaml +++ b/docs/admin/multiple-schedulers/pod1.yaml @@ -7,4 +7,4 @@ metadata: spec: containers: - name: pod-with-no-annotation-container - image: gcr.io/google_containers/pause:2.0 \ No newline at end of file + image: gcr.io/google_containers/pause:2.0 diff --git a/docs/concepts/abstractions/controllers/my-repset.yaml b/docs/concepts/abstractions/controllers/my-repset.yaml deleted file mode 100644 index 54befd8f9d..0000000000 --- a/docs/concepts/abstractions/controllers/my-repset.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: ReplicaSet -metadata: - name: my-repset -spec: - replicas: 3 - selector: - matchLabels: - pod-is-for: garbage-collection-example - template: - metadata: - labels: - pod-is-for: garbage-collection-example - spec: - containers: - - name: nginx - image: nginx diff --git a/docs/concepts/cluster-administration/cloud-providers.md b/docs/concepts/cluster-administration/cloud-providers.md index 739476217c..7b31be5cd7 100644 --- a/docs/concepts/cluster-administration/cloud-providers.md +++ b/docs/concepts/cluster-administration/cloud-providers.md @@ -213,6 +213,28 @@ provider configuration: bs-version=v2 ``` +#### Metadata +These configuration options for the OpenStack provider pertain to metadata and +should appear in the `[Metadata]` section of the `cloud.conf` file: + +* `search-order` (Optional): This configuration key influences the way that the + provider retrieves metadata relating to the instance(s) in which it runs. The + default value of `configDrive,metadataService` results in the provider + retrieving metadata relating to the instance from the config drive first if + available and then the metadata service. Alternative values are: + * `configDrive` - Only retrieve instance metadata from the configuration + drive. + * `metadataService` - Only retrieve instance metadata from the metadata + service. + * `metadataService,configDrive` - Retrieve instance metadata from the metadata + service first if available, then the configuration drive. + + Influencing this behavior may be desirable as the metadata on the + configuration drive may grow stale over time, whereas the metadata service + always provides the most up to date view. Not all OpenStack clouds provide + both configuration drive and metadata service though and only one or the other + may be available which is why the default is to check both. + #### Router These configuration options for the OpenStack provider pertain to routing and should appear in the `[Route]` section of the `cloud.conf` file: diff --git a/docs/concepts/configuration/overview.md b/docs/concepts/configuration/overview.md index f9151eca8c..098517d9a7 100644 --- a/docs/concepts/configuration/overview.md +++ b/docs/concepts/configuration/overview.md @@ -37,13 +37,7 @@ This is a living document. If you think of something that is not on this list bu ## Services -- It's typically best to create a [service](/docs/concepts/services-networking/service/) before corresponding [replication controllers](/docs/concepts/workloads/controllers/replicationcontroller/). This lets the scheduler spread the pods that comprise the service. - - You can also use this process to ensure that at least one replica works before creating lots of them: - - 1. Create a replication controller without specifying replicas (this will set replicas=1); - 2. Create a service; - 3. Then scale up the replication controller. +- It's typically best to create a [service](/docs/concepts/services-networking/service/) before the corresponding [replication controllers](/docs/concepts/workloads/controllers/replicationcontroller/). This lets the scheduler spread the pods that comprise the service. - Don't use `hostPort` unless it is absolutely necessary (for example: for a node daemon). It specifies the port number to expose on the host. When you bind a Pod to a `hostPort`, there are a limited number of places to schedule a pod due to port conflicts— you can only schedule as many such Pods as there are nodes in your Kubernetes cluster. diff --git a/docs/concepts/configuration/pod-priority-preemption.md b/docs/concepts/configuration/pod-priority-preemption.md index ce30c79c67..9ee15dafbf 100644 --- a/docs/concepts/configuration/pod-priority-preemption.md +++ b/docs/concepts/configuration/pod-priority-preemption.md @@ -39,8 +39,7 @@ The following sections provide more information about these steps. ## Enabling priority and preemption Pod priority and preemption is disabled by default in Kubernetes 1.8. -To enable the feature, set this command-line flag for the API server -and the scheduler: +To enable the feature, set this command-line flag for the API server, scheduler and kubelet: ``` --feature-gates=PodPriority=true diff --git a/docs/concepts/overview/working-with-objects/nginx-deployment.yaml b/docs/concepts/overview/working-with-objects/nginx-deployment.yaml index 8925d1b08d..4139bd1ac1 100644 --- a/docs/concepts/overview/working-with-objects/nginx-deployment.yaml +++ b/docs/concepts/overview/working-with-objects/nginx-deployment.yaml @@ -4,6 +4,9 @@ metadata: name: nginx-deployment spec: replicas: 3 + selector: + matchLabels: + app: nginx template: metadata: labels: diff --git a/docs/concepts/services-networking/service.md b/docs/concepts/services-networking/service.md index 0adab1cfae..15ae7d2b9c 100644 --- a/docs/concepts/services-networking/service.md +++ b/docs/concepts/services-networking/service.md @@ -117,7 +117,7 @@ subsets: - port: 9376 ``` -NOTE: Endpoint IPs may not be loopback (127.0.0.0/8), link-local +**NOTE:** Endpoint IPs may not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast (224.0.0.0/24). Accessing a `Service` without a selector works the same as if it had a selector. @@ -151,13 +151,11 @@ its pods, add appropriate selectors or endpoints and change the service `type`. Every node in a Kubernetes cluster runs a `kube-proxy`. `kube-proxy` is responsible for implementing a form of virtual IP for `Services` of type other than `ExternalName`. -In Kubernetes v1.0 the proxy was purely in userspace. In Kubernetes v1.1 an -iptables proxy was added, but was not the default operating mode. Since -Kubernetes v1.2, the iptables proxy is the default. - -As of Kubernetes v1.0, `Services` are a "layer 4" (TCP/UDP over IP) construct. -In Kubernetes v1.1 the `Ingress` API was added (beta) to represent "layer 7" -(HTTP) services. +In Kubernetes v1.0, `Services` are a "layer 4" (TCP/UDP over IP) construct, the +proxy was purely in userspace. In Kubernetes v1.1, the `Ingress` API was added +(beta) to represent "layer 7"(HTTP) services, iptables proxy was added too, +and become the default operating mode since Kubernetes v1.2. In Kubernetes v1.9-alpha, +ipvs proxy was added. ### Proxy-mode: userspace @@ -169,37 +167,20 @@ will be proxied to one of the `Service`'s backend `Pods` (as reported in `SessionAffinity` of the `Service`. Lastly, it installs iptables rules which capture traffic to the `Service`'s `clusterIP` (which is virtual) and `Port` and redirects that traffic to the proxy port which proxies the backend `Pod`. - -The net result is that any traffic bound for the `Service`'s IP:Port is proxied -to an appropriate backend without the clients knowing anything about Kubernetes -or `Services` or `Pods`. - -By default, the choice of backend is round robin. Client-IP based session affinity -can be selected by setting `service.spec.sessionAffinity` to `"ClientIP"` (the -default is `"None"`), and you can set the max session sticky time by setting the field -`service.spec.sessionAffinityConfig.clientIP.timeoutSeconds` if you have already set -`service.spec.sessionAffinity` to `"ClientIP"` (the default is "10800"). +By default, the choice of backend is round robin. ![Services overview diagram for userspace proxy](/images/docs/services-userspace-overview.svg) ### Proxy-mode: iptables In this mode, kube-proxy watches the Kubernetes master for the addition and -removal of `Service` and `Endpoints` objects. For each `Service` it installs +removal of `Service` and `Endpoints` objects. For each `Service`, it installs iptables rules which capture traffic to the `Service`'s `clusterIP` (which is virtual) and `Port` and redirects that traffic to one of the `Service`'s -backend sets. For each `Endpoints` object it installs iptables rules which -select a backend `Pod`. +backend sets. For each `Endpoints` object, it installs iptables rules which +select a backend `Pod`.By default, the choice of backend is random. -By default, the choice of backend is random. Client-IP based session affinity -can be selected by setting `service.spec.sessionAffinity` to `"ClientIP"` (the -default is `"None"`), and you can set the max session sticky time by setting the field -`service.spec.sessionAffinityConfig.clientIP.timeoutSeconds` if you have already set -`service.spec.sessionAffinity` to `"ClientIP"` (the default is "10800"). - -As with the userspace proxy, the net result is that any traffic bound for the -`Service`'s IP:Port is proxied to an appropriate backend without the clients -knowing anything about Kubernetes or `Services` or `Pods`. This should be +Obviously, iptables need not switch back between userspace and kernelspace, it should be faster and more reliable than the userspace proxy. However, unlike the userspace proxier, the iptables proxier cannot automatically retry another `Pod` if the one it initially selects does not respond, so it depends on @@ -231,12 +212,21 @@ options for load balancing algorithm, such as: - nq: never queue **Note:** ipvs mode assumed IPVS kernel modules are installed on the node -before running kube-proxy. When kube-proxy starts, if proxy mode is ipvs, +before running kube-proxy. When kube-proxy starts with ipvs proxy mode, kube-proxy would validate if IPVS modules are installed on the node, if it's not installed kube-proxy will fall back to iptables proxy mode. ![Services overview diagram for ipvs proxy](/images/docs/services-ipvs-overview.svg) +In any of proxy model, any traffic bound for the Service’s IP:Port is +proxied to an appropriate backend without the clients knowing anything +about Kubernetes or Services or Pods. Client-IP based session affinity +can be selected by setting service.spec.sessionAffinity to "ClientIP" +(the default is "None"), and you can set the max session sticky time by +setting the field service.spec.sessionAffinityConfig.clientIP.timeoutSeconds +if you have already set service.spec.sessionAffinity to "ClientIP" +(the default is “10800”). + ## Multi-Port Services Many `Services` need to expose more than one port. For this case, Kubernetes @@ -727,6 +717,10 @@ work, and the client IP is not altered. This same basic flow executes when traffic comes in through a node-port or through a load-balancer, though in those cases the client IP does get altered. +#### Ipvs + +Iptables operations slow down dramatically in large scale cluster e.g 10,000 Services. IPVS is designed for load balancing and based on in-kernel hash tables. So we can achieve performance consistency in large number of services from IPVS-based kube-proxy. Meanwhile, IPVS-based kube-proxy has more sophisticated load balancing algorithms (least conns, locality, weighted, persistence). + ## API Object Service is a top-level resource in the Kubernetes REST API. More details about the diff --git a/docs/concepts/storage/persistent-volumes.md b/docs/concepts/storage/persistent-volumes.md index 4dccc7bc75..aebe9c5cf6 100644 --- a/docs/concepts/storage/persistent-volumes.md +++ b/docs/concepts/storage/persistent-volumes.md @@ -54,7 +54,7 @@ dynamic provisioning for themselves. To enable dynamic storage provisioning based on storage class, the cluster administrator needs to enable the `DefaultStorageClass` [admission controller](/docs/admin/admission-controllers/#defaultstorageclass) on the API server. This can be done, for example, by ensuring that `DefaultStorageClass` is -among the comma-delimited, ordered list of values for the `--admission-control` flag of +among the comma-delimited, ordered list of values for the `--admission-control` flag of the API server component. For more information on API server command line flags, please check [kube-apiserver](/docs/admin/kube-apiserver/) documentation. @@ -417,8 +417,6 @@ spec: `PersistentVolumes` binds are exclusive, and since `PersistentVolumeClaims` are namespaced objects, mounting claims with "Many" modes (`ROX`, `RWX`) is only possible within one namespace. -`` - ## Writing Portable Configuration If you're writing configuration templates or examples that run on a wide range of clusters @@ -455,4 +453,3 @@ and need persistent storage, we recommend that you use the following pattern: default. At some point, the alpha annotation will cease to have meaning, but the unset `storageClass` field on the PVC will have the desired effect. - diff --git a/docs/concepts/workloads/controllers/garbage-collection.md b/docs/concepts/workloads/controllers/garbage-collection.md index b220a17cdd..2f83cc87ab 100644 --- a/docs/concepts/workloads/controllers/garbage-collection.md +++ b/docs/concepts/workloads/controllers/garbage-collection.md @@ -40,7 +40,7 @@ If you create the ReplicaSet and then view the Pod metadata, you can see OwnerReferences field: ```shell -kubectl create -f https://k8s.io/docs/concepts/abstractions/controllers/my-repset.yaml +kubectl create -f https://k8s.io/docs/concepts/controllers/my-repset.yaml kubectl get pods --output=yaml ``` diff --git a/docs/home/contribute/style-guide.md b/docs/home/contribute/style-guide.md index 4b5efb30bd..db330d32ab 100644 --- a/docs/home/contribute/style-guide.md +++ b/docs/home/contribute/style-guide.md @@ -18,6 +18,12 @@ docs, follow the instructions on **Note:** Kubernetes documentation uses [GitHub Flavored Markdown](https://github.github.com/gfm/). {: .note} + +## Language + +Kubernetes documentation uses US English. + + ## Documentation formatting standards ### Use camel case for API objects diff --git a/docs/setup/independent/install-kubeadm.md b/docs/setup/independent/install-kubeadm.md index 3a4c1536c2..b07895df7c 100644 --- a/docs/setup/independent/install-kubeadm.md +++ b/docs/setup/independent/install-kubeadm.md @@ -86,15 +86,21 @@ apt-get update apt-get install -y docker.io ``` -or install Docker CE 17.03 from Docker's repositories for Ubuntu or Debian: +or install Docker CE 17.09 from Docker's repositories for Ubuntu or Debian: ```bash -apt-get update && apt-get install -y curl apt-transport-https +apt-get update +apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -cat </etc/apt/sources.list.d/docker.list -deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable -EOF -apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}') +add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \ + $(lsb_release -cs) \ + stable" +apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.09 | head -1 | awk '{print $3}') ``` {% endcapture %} @@ -130,6 +136,9 @@ as Docker (e.g. `cgroupfs`). {% include tabs.md %} +Refer to the [official Docker installation guides](https://docs.docker.com/engine/installation/) +for more information. + ## Installing kubeadm, kubelet and kubectl You will install these packages on all of your machines: diff --git a/docs/tasks/access-kubernetes-api/setup-extension-api-server.md b/docs/tasks/access-kubernetes-api/setup-extension-api-server.md index bd9404a1b4..591bf441c9 100644 --- a/docs/tasks/access-kubernetes-api/setup-extension-api-server.md +++ b/docs/tasks/access-kubernetes-api/setup-extension-api-server.md @@ -38,7 +38,7 @@ Alternatively, you can use an existing 3rd party solution, such as [apiserver-bu 1. Create a Kubernetes service account in your namespace. 1. Create a Kubernetes cluster role for the operations you want to allow on your resources. 1. Create a Kubernetes cluster role binding from the default service account in your namespace to the cluster role you just created. -1. Create a Kubernetes apiservice. The CA cert above should be base 64 encoded, stripped of new lines and used as the spec.caBundle in the apiservce. This should not be namespaced. +1. Create a Kubernetes apiservice. The CA cert above should be base 64 encoded, stripped of new lines and used as the spec.caBundle in the apiservice. This should not be namespaced. 1. Use kubectl to get your resource. It should return "No resources found." Which means that everything worked but you currently have no objects of that resource type created yet. {% endcapture %} diff --git a/docs/tasks/administer-cluster/developing-cloud-controller-manager.md b/docs/tasks/administer-cluster/developing-cloud-controller-manager.md index c84b56dad5..9a5d946da6 100644 --- a/docs/tasks/administer-cluster/developing-cloud-controller-manager.md +++ b/docs/tasks/administer-cluster/developing-cloud-controller-manager.md @@ -17,7 +17,7 @@ can develop their features independantly from the core Kubernetes release cycles Before going into how to build your own cloud controller manager, some background on how it works under the hood is helpful. The cloud controller manager is code from `kube-controller-manager` utilizing Go interfaces to allow implementations from any cloud to be plugged in. Most of the scaffolding and generic controller implementations will be in core, but it will always exec out to the cloud interfaces it is provided, so long as the [cloud provider interface](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/cloud.go#L29-L50) is satisifed. -To dive a little deeper into implementation details, all cloud controller managers will import packages from Kubernetes core, the only difference being each project will register their own cloud providers by calling [cloudprovider.RegisterCloudProvier](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/plugins.go#L42-L52) where a global variable of available cloud providers is updated. +To dive a little deeper into implementation details, all cloud controller managers will import packages from Kubernetes core, the only difference being each project will register their own cloud providers by calling [cloudprovider.RegisterCloudProvider](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/plugins.go#L42-L52) where a global variable of available cloud providers is updated. ## Developing diff --git a/docs/tasks/administer-cluster/quota-api-object.md b/docs/tasks/administer-cluster/quota-api-object.md index fd3fdd2236..978cc02037 100644 --- a/docs/tasks/administer-cluster/quota-api-object.md +++ b/docs/tasks/administer-cluster/quota-api-object.md @@ -67,7 +67,7 @@ status: services.nodeports: "0" ``` -## Create a PersistentVolumeClaim: +## Create a PersistentVolumeClaim Here is the configuration file for a PersistentVolumeClaim object: @@ -92,7 +92,7 @@ NAME STATUS pvc-quota-demo Pending ``` -## Attempt to create a second PersistentVolumeClaim: +## Attempt to create a second PersistentVolumeClaim Here is the configuration file for a second PersistentVolumeClaim: diff --git a/docs/tasks/configure-pod-container/configmap.md b/docs/tasks/configure-pod-container/configmap.md index e77248b191..d31ea8f978 100644 --- a/docs/tasks/configure-pod-container/configmap.md +++ b/docs/tasks/configure-pod-container/configmap.md @@ -36,7 +36,9 @@ The data source corresponds to a key-value pair in the ConfigMap, where * key = the file name or the key you provided on the command line, and * value = the file contents or the literal value you provided on the command line. -You can use [`kubectl describe`](/docs/user-guide/kubectl/{{page.version}}/#describe) or [`kubectl get`](/docs/user-guide/kubectl/{{page.version}}/#get) to retrieve information about a ConfigMap. The former shows a summary of the ConfigMap, while the latter returns the full contents of the ConfigMap. +You can use [`kubectl describe`](/docs/user-guide/kubectl/{{page.version}}/#describe) or +[`kubectl get`](/docs/user-guide/kubectl/{{page.version}}/#get) to retrieve information +about a ConfigMap. ### Create ConfigMaps from directories diff --git a/docs/tasks/debug-application-cluster/debug-application-introspection.md b/docs/tasks/debug-application-cluster/debug-application-introspection.md index a149efba6f..917cc18d5a 100644 --- a/docs/tasks/debug-application-cluster/debug-application-introspection.md +++ b/docs/tasks/debug-application-cluster/debug-application-introspection.md @@ -16,33 +16,12 @@ your pods. But there are a number of ways to get even more information about you For this example we'll use a Deployment to create two pods, similar to the earlier example. -```yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: nginx-deployment -spec: - replicas: 2 - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx - resources: - limits: - memory: "128Mi" - cpu: "500m" - ports: - - containerPort: 80 -``` +{% include code.html language="yaml" file="nginx-dep.yaml" ghlink="/docs/tasks/debug-application-cluster/nginx-dep.yaml" %} -Copy this to a file *./my-nginx-dep.yaml* +Create deployment by running following command: ```shell -$ kubectl create -f ./my-nginx-dep.yaml +$ kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/nginx-dep.yaml deployment "nginx-deployment" created ``` diff --git a/docs/concepts/abstractions/nginx-deployment.yaml b/docs/tasks/debug-application-cluster/nginx-dep.yaml similarity index 57% rename from docs/concepts/abstractions/nginx-deployment.yaml rename to docs/tasks/debug-application-cluster/nginx-dep.yaml index 2aabf5e7b1..9051645fbb 100644 --- a/docs/concepts/abstractions/nginx-deployment.yaml +++ b/docs/tasks/debug-application-cluster/nginx-dep.yaml @@ -1,9 +1,9 @@ -apiVersion: apps/v1beta1 +apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-deployment spec: - replicas: 3 + replicas: 2 template: metadata: labels: @@ -11,6 +11,10 @@ spec: spec: containers: - name: nginx - image: nginx:1.7.9 + image: nginx + resources: + limits: + memory: "128Mi" + cpu: "500m" ports: - containerPort: 80 diff --git a/docs/tasks/federation/set-up-cluster-federation-kubefed.md b/docs/tasks/federation/set-up-cluster-federation-kubefed.md index a615cdbf25..a73e06f6fc 100644 --- a/docs/tasks/federation/set-up-cluster-federation-kubefed.md +++ b/docs/tasks/federation/set-up-cluster-federation-kubefed.md @@ -371,44 +371,35 @@ For more information see ## Adding a cluster to a federation -Once you've deployed a federation control plane, you'll need to make -that control plane aware of the clusters it should manage. You can add -a cluster to your federation by using the [`kubefed join`](/docs/admin/kubefed_join/) -command. A new context will have been added to your kubeconfig named `fellowship` -(after the name of your federation). To join clusters into the federation, you will -need to change the context. +After you've deployed a federation control plane, you'll need to make that control plane aware of the clusters it should manage. -``` -kubectl config use-context fellowship -``` +To join clusters into the federation: -To use `kubefed join`, you'll need to provide the name of the cluster -you want to add to the federation, and the `--host-cluster-context` -for the federation control plane's host cluster. +1. Change the context: -> Note: The name that you provide to the `join` command is used as the -joining cluster's identity in federation. This name should adhere to -the rules described in the -[identifiers doc](/docs/concepts/overview/working-with-objects/names/). If the context -corresponding to your joining cluster conforms to these rules then you -can use the same name in the join command. Otherwise, you will have to -choose a different name for your cluster's identity. For more -information, please see the -[naming rules and customization](#naming-rules-and-customization) -section below. + kubectl config use-context fellowship -The following example command adds the cluster `gondor` to the -federation running on host cluster `rivendell`: +1. If you are using a managed cluster service, allow the service to access the cluster. To do this, create a `clusterrolebinding` for the account associated with your cluster service: -``` -kubefed join gondor --host-cluster-context=rivendell -``` + kubectl create clusterrolebinding -cluster-admin-binding --clusterrole=cluster-admin --user=@example.org --context= Note: The name that you provide to the `join` command is used as the joining cluster's identity in federation. If this name adheres to the rules described in the [identifiers doc](/docs/concepts/overview/working-with-objects/names/). If the context +corresponding to your joining cluster conforms to these rules then you can use the same name in the join command. Otherwise, you will have to choose a different name for your cluster's identity. -> Note: Kubernetes requires that you manually join clusters to a -federation because the federation control plane manages only those -clusters that it is responsible for managing. Adding a cluster tells -the federation control plane that it is responsible for managing that -cluster. ### Naming rules and customization diff --git a/docs/tasks/inject-data-application/distribute-credentials-secure.md b/docs/tasks/inject-data-application/distribute-credentials-secure.md index c85532fe86..b48f22ab97 100644 --- a/docs/tasks/inject-data-application/distribute-credentials-secure.md +++ b/docs/tasks/inject-data-application/distribute-credentials-secure.md @@ -37,7 +37,7 @@ username and password: 1. Create the Secret - kubectl create -f secret.yaml + kubectl create -f https://k8s.io/docs/tasks/inject-data-application/secret.yaml **Note:** If you want to skip the Base64 encoding step, you can create a Secret by using the `kubectl create secret` command: @@ -81,7 +81,7 @@ Here is a configuration file you can use to create a Pod: 1. Create the Pod: - kubectl create -f secret-pod.yaml + kubectl create -f https://k8s.io/docs/tasks/inject-data-application/secret-pod.yaml 1. Verify that your Pod is running: @@ -128,7 +128,7 @@ Here is a configuration file you can use to create a Pod: 1. Create the Pod: - kubectl create -f secret-envars-pod.yaml + kubectl create -f https://k8s.io/docs/tasks/inject-data-application/secret-envars-pod.yaml 1. Verify that your Pod is running: diff --git a/docs/tasks/inject-data-application/podpreset-allow-db-merged.yaml b/docs/tasks/inject-data-application/podpreset-allow-db-merged.yaml index 73d93312fa..0cf950c803 100644 --- a/docs/tasks/inject-data-application/podpreset-allow-db-merged.yaml +++ b/docs/tasks/inject-data-application/podpreset-allow-db-merged.yaml @@ -10,7 +10,7 @@ metadata: spec: containers: - name: website - image: ecorp/website + image: nginx volumeMounts: - mountPath: /cache name: cache-volume diff --git a/docs/tasks/inject-data-application/podpreset-allow-db.yaml b/docs/tasks/inject-data-application/podpreset-allow-db.yaml index 96f6dbfe20..97203fdb9c 100644 --- a/docs/tasks/inject-data-application/podpreset-allow-db.yaml +++ b/docs/tasks/inject-data-application/podpreset-allow-db.yaml @@ -2,7 +2,6 @@ apiVersion: settings.k8s.io/v1alpha1 kind: PodPreset metadata: name: allow-database - namespace: myns spec: selector: matchLabels: diff --git a/docs/tasks/inject-data-application/podpreset-conflict-pod.yaml b/docs/tasks/inject-data-application/podpreset-conflict-pod.yaml index 9061b9f5e8..cf201b2f06 100644 --- a/docs/tasks/inject-data-application/podpreset-conflict-pod.yaml +++ b/docs/tasks/inject-data-application/podpreset-conflict-pod.yaml @@ -8,7 +8,7 @@ metadata: spec: containers: - name: website - image: ecorp/website + image: nginx volumeMounts: - mountPath: /cache name: cache-volume diff --git a/docs/tasks/inject-data-application/podpreset-conflict-preset.yaml b/docs/tasks/inject-data-application/podpreset-conflict-preset.yaml index ab70b14d28..a2ad96c48a 100644 --- a/docs/tasks/inject-data-application/podpreset-conflict-preset.yaml +++ b/docs/tasks/inject-data-application/podpreset-conflict-preset.yaml @@ -2,7 +2,6 @@ apiVersion: settings.k8s.io/v1alpha1 kind: PodPreset metadata: name: allow-database - namespace: myns spec: selector: matchLabels: diff --git a/docs/tasks/inject-data-application/podpreset-merged.yaml b/docs/tasks/inject-data-application/podpreset-merged.yaml index 0a5dfce0b5..97c022c86c 100644 --- a/docs/tasks/inject-data-application/podpreset-merged.yaml +++ b/docs/tasks/inject-data-application/podpreset-merged.yaml @@ -10,7 +10,7 @@ metadata: spec: containers: - name: website - image: ecorp/website + image: nginx volumeMounts: - mountPath: /cache name: cache-volume diff --git a/docs/tasks/inject-data-application/podpreset-multi-merged.yaml b/docs/tasks/inject-data-application/podpreset-multi-merged.yaml index dd6a7197ef..7fcaae62e3 100644 --- a/docs/tasks/inject-data-application/podpreset-multi-merged.yaml +++ b/docs/tasks/inject-data-application/podpreset-multi-merged.yaml @@ -11,7 +11,7 @@ metadata: spec: containers: - name: website - image: ecorp/website + image: nginx volumeMounts: - mountPath: /cache name: cache-volume diff --git a/docs/tasks/inject-data-application/podpreset-pod.yaml b/docs/tasks/inject-data-application/podpreset-pod.yaml index 82c590a924..b6b4e60d6e 100644 --- a/docs/tasks/inject-data-application/podpreset-pod.yaml +++ b/docs/tasks/inject-data-application/podpreset-pod.yaml @@ -8,7 +8,7 @@ metadata: spec: containers: - name: website - image: ecorp/website + image: nginx ports: - containerPort: 80 diff --git a/docs/tasks/inject-data-application/podpreset-preset.yaml b/docs/tasks/inject-data-application/podpreset-preset.yaml index c5d34437f2..f300289c82 100644 --- a/docs/tasks/inject-data-application/podpreset-preset.yaml +++ b/docs/tasks/inject-data-application/podpreset-preset.yaml @@ -2,7 +2,6 @@ apiVersion: settings.k8s.io/v1alpha1 kind: PodPreset metadata: name: allow-database - namespace: myns spec: selector: matchLabels: diff --git a/docs/tasks/inject-data-application/podpreset-proxy.yaml b/docs/tasks/inject-data-application/podpreset-proxy.yaml index 20dab81f36..d854475ac2 100644 --- a/docs/tasks/inject-data-application/podpreset-proxy.yaml +++ b/docs/tasks/inject-data-application/podpreset-proxy.yaml @@ -2,7 +2,6 @@ apiVersion: settings.k8s.io/v1alpha1 kind: PodPreset metadata: name: proxy - namespace: myns spec: selector: matchLabels: diff --git a/docs/tasks/inject-data-application/podpreset.md b/docs/tasks/inject-data-application/podpreset.md index d2571ab844..4368608690 100644 --- a/docs/tasks/inject-data-application/podpreset.md +++ b/docs/tasks/inject-data-application/podpreset.md @@ -20,18 +20,50 @@ You can get an overview of PodPresets at This is a simple example to show how a Pod spec is modified by the Pod Preset. -**User submitted pod spec:** +{% include code.html language="yaml" file="podpreset-preset.yaml" ghlink="/docs/tasks/inject-data-application/podpreset-preset.yaml" %} + +Create the PodPreset: + +```shell +kubectl create -f https://k8s.io/docs/tasks/inject-data-application/podpreset-preset.yaml +``` + +Examine the created PodPreset: + +```shell +$ kubectl get podpreset +NAME AGE +allow-database 1m +``` + +The new PodPreset will act upon any pod that has label `role: frontend`. {% include code.html language="yaml" file="podpreset-pod.yaml" ghlink="/docs/tasks/inject-data-application/podpreset-pod.yaml" %} -**Example Pod Preset:** +Create a pod: -{% include code.html language="yaml" file="podpreset-preset.yaml" ghlink="/docs/tasks/inject-data-application/podpreset-preset.yaml" %} +```shell +$ kubectl create -f https://k8s.io/docs/tasks/inject-data-application/podpreset-pod.yaml +``` + +List the running Pods: + +```shell +$ kubectl get pods +NAME READY STATUS RESTARTS AGE +website 1/1 Running 0 4m +``` **Pod spec after admission controller:** {% include code.html language="yaml" file="podpreset-merged.yaml" ghlink="/docs/tasks/inject-data-application/podpreset-merged.yaml" %} +To see above output, run the following command: + +```shell +$ kubectl get pod website -o yaml +``` + ### Pod Spec with `ConfigMap` Example This is an example to show how a Pod spec is modified by the Pod Preset @@ -113,7 +145,7 @@ when there is a conflict. **If we run `kubectl describe...` we can see the event:** -``` +```shell $ kubectl describe ... .... Events: diff --git a/docs/tutorials/stateful-application/zookeeper.md b/docs/tutorials/stateful-application/zookeeper.md index 5c07373bf3..7b7f1d0b4d 100644 --- a/docs/tutorials/stateful-application/zookeeper.md +++ b/docs/tutorials/stateful-application/zookeeper.md @@ -100,7 +100,7 @@ Open a command terminal, and use manifest. ```shell -kubectl apply -f https://k8s.io/docs/tutorials/stateful-application/zookeeper.yaml +kubectl apply -f https://raw.githubusercontent.com/kubernetes/website/master/docs/tutorials/stateful-application/zookeeper.yaml ``` This creates the `zk-hs` Headless Service, the `zk-cs` Service, diff --git a/docs/user-guide/kubectl-overview.md b/docs/user-guide/kubectl-overview.md index 923a99558e..5ae7485c5b 100644 --- a/docs/user-guide/kubectl-overview.md +++ b/docs/user-guide/kubectl-overview.md @@ -264,6 +264,17 @@ $ kubectl describe pods $ kubectl describe pods --include-uninitialized=false ``` +**Note:** The `kubectl get` command is usually used for retrieving one or more +resources of the same resource type. It features a rich set of flags that allows +you to customize the output format using the `-o` or `--output` flag, for example. +You can specify the `-w` or `--watch` flag to start watching updates to a particular +object. The `kubectl describe` command is more focused on describing the many +related aspects of a specified resource. It may invoke several API calls to the +API server to build a view for the user. For example, the `kubectl describe node` +command retrieves not only the information about the node, but also a summary of +the pods running on it, the events generated for the node etc. +{: .note} + `kubectl delete` - Delete resources either from a file, stdin, or specifying label selectors, names, resource selectors, or resources. ```shell diff --git a/docs/user-guide/walkthrough/index.md b/docs/user-guide/walkthrough/index.md index c456638dac..20fd482271 100644 --- a/docs/user-guide/walkthrough/index.md +++ b/docs/user-guide/walkthrough/index.md @@ -97,8 +97,8 @@ volumes: ```yaml volumeMounts: - # name must match the volume name below - - name: redis-persistent-storage +    # name must match the volume name defined in volumes +    - name: redis-persistent-storage # mount path within the container mountPath: /data/redis ``` diff --git a/images/KubeCon_NA_Community.jpg b/images/KubeCon_NA_Community.jpg new file mode 100644 index 0000000000..ab046414be Binary files /dev/null and b/images/KubeCon_NA_Community.jpg differ diff --git a/images/square-logos/componentsoft.png b/images/square-logos/componentsoft.png new file mode 100644 index 0000000000..cdd7b4d4dd Binary files /dev/null and b/images/square-logos/componentsoft.png differ diff --git a/images/square-logos/dataspine.png b/images/square-logos/dataspine.png new file mode 100644 index 0000000000..95ab24a311 Binary files /dev/null and b/images/square-logos/dataspine.png differ diff --git a/images/square-logos/isotoma.png b/images/square-logos/isotoma.png new file mode 100644 index 0000000000..b1ac23d905 Binary files /dev/null and b/images/square-logos/isotoma.png differ diff --git a/images/square-logos/objectcomputing.png b/images/square-logos/objectcomputing.png new file mode 100644 index 0000000000..622e6b98a6 Binary files /dev/null and b/images/square-logos/objectcomputing.png differ diff --git a/images/square-logos/redzara.png b/images/square-logos/redzara.png new file mode 100644 index 0000000000..4aa3b9bbbe Binary files /dev/null and b/images/square-logos/redzara.png differ diff --git a/images/square-logos/servian.png b/images/square-logos/servian.png new file mode 100644 index 0000000000..aeaaa58a21 Binary files /dev/null and b/images/square-logos/servian.png differ diff --git a/images/square-logos/vexxhost.png b/images/square-logos/vexxhost.png new file mode 100644 index 0000000000..c7060c021c Binary files /dev/null and b/images/square-logos/vexxhost.png differ diff --git a/index.html b/index.html index a3f73aaac3..cf22d1e40c 100644 --- a/index.html +++ b/index.html @@ -64,7 +64,7 @@ cid: home

- Attend KubeCon in Austin, TX on December 6-8, 2017 + Attend KubeCon in Austin, TX on December 6-8, 2017
diff --git a/partners/index.html b/partners/index.html index 271dcd0b25..14f39332d0 100644 --- a/partners/index.html +++ b/partners/index.html @@ -22,8 +22,8 @@ cid: partners

Kubernetes Certified Service Providers (KCSP)

-

The KCSP program is a vetted tier of service providers who have deep experience helping enterprises successfully adopt Kubernetes. KCSP partners offer Kubernetes support, consulting, professional services and training for organizations embarking on their Kubernetes journey.

-

Interested in becoming a KCSP? Learn more.

+

The KCSP program is a vetted tier of service providers who have deep experience helping enterprises successfully adopt Kubernetes. KCSP partners offer Kubernetes support, consulting, professional services and training for organizations embarking on their Kubernetes journey. Learn more about the program here.

+

Interested in becoming a KCSP? Please fill out this form.

@@ -35,13 +35,13 @@ cid: partners

Technology Partners

Technology partners offer integrations and plugins that add features to Kubernetes applications.

-

Interested in becoming a Technology Partner? Please fill out this form.

+

Interested in becoming a Technology Partner? Please fill out this form.

Service Partners

Service Partners offer consulting or management services to help companies implement and use Kubernetes in commercial applications.

-

Interested in becoming a Service Provider? Please fill out this form

+

Interested in becoming a Service Provider? Please fill out this form.

@@ -53,4 +53,4 @@ cid: partners \ No newline at end of file + diff --git a/test/examples_test.go b/test/examples_test.go index be88ff908f..87b7e9a54a 100644 --- a/test/examples_test.go +++ b/test/examples_test.go @@ -32,15 +32,17 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/yaml" - api "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/apps" apps_validation "k8s.io/kubernetes/pkg/apis/apps/validation" + "k8s.io/kubernetes/pkg/apis/autoscaling" + autoscaling_validation "k8s.io/kubernetes/pkg/apis/autoscaling/validation" "k8s.io/kubernetes/pkg/apis/batch" batch_validation "k8s.io/kubernetes/pkg/apis/batch/validation" + api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/extensions" - expvalidation "k8s.io/kubernetes/pkg/apis/extensions/validation" + ext_validation "k8s.io/kubernetes/pkg/apis/extensions/validation" "k8s.io/kubernetes/pkg/apis/policy" policyvalidation "k8s.io/kubernetes/pkg/apis/policy/validation" "k8s.io/kubernetes/pkg/apis/storage" @@ -113,11 +115,21 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { t.Namespace = api.NamespaceDefault } errors = validation.ValidateResourceQuota(t) + case *autoscaling.HorizontalPodAutoscaler: + if t.Namespace == "" { + t.Namespace = api.NamespaceDefault + } + errors = autoscaling_validation.ValidateHorizontalPodAutoscaler(t) case *extensions.Deployment: if t.Namespace == "" { t.Namespace = api.NamespaceDefault } - errors = expvalidation.ValidateDeployment(t) + errors = ext_validation.ValidateDeployment(t) + case *extensions.ReplicaSet: + if t.Namespace == "" { + t.Namespace = api.NamespaceDefault + } + errors = ext_validation.ValidateReplicaSet(t) case *batch.Job: if t.Namespace == "" { t.Namespace = api.NamespaceDefault @@ -130,14 +142,14 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) { if t.Namespace == "" { t.Namespace = api.NamespaceDefault } - errors = expvalidation.ValidateIngress(t) + errors = ext_validation.ValidateIngress(t) case *extensions.DaemonSet: if t.Namespace == "" { t.Namespace = api.NamespaceDefault } - errors = expvalidation.ValidateDaemonSet(t) + errors = ext_validation.ValidateDaemonSet(t) case *extensions.PodSecurityPolicy: - errors = expvalidation.ValidatePodSecurityPolicy(t) + errors = ext_validation.ValidatePodSecurityPolicy(t) case *batch.CronJob: if t.Namespace == "" { t.Namespace = api.NamespaceDefault @@ -218,45 +230,76 @@ func walkConfigFiles(inDir string, fn func(name, path string, data [][]byte)) er } func TestExampleObjectSchemas(t *testing.T) { + // Please help maintain the alphabeta order in the map cases := map[string]map[string][]runtime.Object{ - "../docs/user-guide/walkthrough": { - "deployment": {&extensions.Deployment{}}, - "deployment-update": {&extensions.Deployment{}}, - "pod-nginx": {&api.Pod{}}, - "pod-nginx-with-label": {&api.Pod{}}, - "pod-redis": {&api.Pod{}}, - "pod-with-http-healthcheck": {&api.Pod{}}, - "pod-with-tcp-socket-healthcheck": {&api.Pod{}}, - "podtemplate": {&api.PodTemplate{}}, - "service": {&api.Service{}}, + "../docs/admin/high-availability": { + "etcd": {&api.Pod{}}, + "kube-apiserver": {&api.Pod{}}, + "kube-controller-manager": {&api.Pod{}}, + "kube-scheduler": {&api.Pod{}}, + "podmaster": {&api.Pod{}}, }, - "../docs/user-guide/update-demo": { - "kitten-rc": {&api.ReplicationController{}}, - "nautilus-rc": {&api.ReplicationController{}}, + "../docs/admin/limitrange": { + "invalid-pod": {&api.Pod{}}, + "limits": {&api.LimitRange{}}, + "namespace": {&api.Namespace{}}, + "valid-pod": {&api.Pod{}}, + }, + "../docs/admin/multiple-schedulers": { + "my-scheduler": {&extensions.Deployment{}}, + "pod1": {&api.Pod{}}, + "pod2": {&api.Pod{}}, + "pod3": {&api.Pod{}}, + }, + "../docs/admin/namespaces": { + "namespace-dev": {&api.Namespace{}}, + "namespace-prod": {&api.Namespace{}}, + }, + "../docs/admin/resourcequota": { + "best-effort": {&api.ResourceQuota{}}, + "compute-resources": {&api.ResourceQuota{}}, + "limits": {&api.LimitRange{}}, + "namespace": {&api.Namespace{}}, + "not-best-effort": {&api.ResourceQuota{}}, + "object-counts": {&api.ResourceQuota{}}, + }, + "../docs/concepts/cluster-administration": { + "counter-pod": {&api.Pod{}}, + "fluentd-sidecar-config": {&api.ConfigMap{}}, + "nginx-app": {&api.Service{}, &extensions.Deployment{}}, + "two-files-counter-pod": {&api.Pod{}}, + "two-files-counter-pod-agent-sidecar": {&api.Pod{}}, + "two-files-counter-pod-streaming-sidecar": {&api.Pod{}}, + }, + "../docs/concepts/configuration": { + "commands": {&api.Pod{}}, + "pod": {&api.Pod{}}, + "pod-with-node-affinity": {&api.Pod{}}, + "pod-with-pod-affinity": {&api.Pod{}}, + }, + "../docs/concepts/overview/working-with-objects": { + "nginx-deployment": {&extensions.Deployment{}}, }, "../docs/concepts/policy": { "psp": {&extensions.PodSecurityPolicy{}}, }, - "../docs/user-guide/persistent-volumes/volumes": { - "local-01": {&api.PersistentVolume{}}, - "local-02": {&api.PersistentVolume{}}, - "gce": {&api.PersistentVolume{}}, - "nfs": {&api.PersistentVolume{}}, + "../docs/concepts/services-networking": { + "curlpod": {&extensions.Deployment{}}, + "hostaliases-pod": {&api.Pod{}}, + "ingress": {&extensions.Ingress{}}, + "nginx-secure-app": {&api.Service{}, &extensions.Deployment{}}, + "nginx-svc": {&api.Service{}}, + "run-my-nginx": {&extensions.Deployment{}}, }, - "../docs/user-guide/persistent-volumes/claims": { - "claim-01": {&api.PersistentVolumeClaim{}}, - "claim-02": {&api.PersistentVolumeClaim{}}, - "claim-03": {&api.PersistentVolumeClaim{}}, - }, - "../docs/user-guide/persistent-volumes/simpletest": { - "namespace": {&api.Namespace{}}, - "pod": {&api.Pod{}}, - "service": {&api.Service{}}, - }, - "../docs/user-guide/liveness": { - "exec-liveness": {&api.Pod{}}, - "http-liveness": {&api.Pod{}}, - "http-liveness-named-port": {&api.Pod{}}, + "../docs/concepts/workloads/controllers": { + "cronjob": {&batch.CronJob{}}, + "daemonset": {&extensions.DaemonSet{}}, + "frontend": {&extensions.ReplicaSet{}}, + "hpa-rs": {&autoscaling.HorizontalPodAutoscaler{}}, + "job": {&batch.Job{}}, + "my-repset": {&extensions.ReplicaSet{}}, + "nginx-deployment": {&extensions.Deployment{}}, + "replication": {&api.ReplicationController{}}, }, "../docs/tasks/job/coarse-parallel-processing-work-queue": { "job": {&batch.Job{}}, @@ -266,6 +309,18 @@ func TestExampleObjectSchemas(t *testing.T) { "redis-pod": {&api.Pod{}}, "redis-service": {&api.Service{}}, }, + "../docs/tutorials/stateful-application": { + "gce-volume": {&api.PersistentVolume{}}, + "mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}}, + "mysql-services": {&api.Service{}, &api.Service{}}, + "mysql-configmap": {&api.ConfigMap{}}, + "mysql-statefulset": {&apps.StatefulSet{}}, + "cassandra-service": {&api.Service{}}, + "cassandra-statefulset": {&apps.StatefulSet{}, &storage.StorageClass{}}, + "web": {&api.Service{}, &apps.StatefulSet{}}, + "webp": {&api.Service{}, &apps.StatefulSet{}}, + "zookeeper": {&api.Service{}, &api.Service{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}}, + }, "../docs/user-guide": { "bad-nginx-deployment": {&extensions.Deployment{}}, "counter-pod": {&api.Pod{}}, @@ -290,9 +345,6 @@ func TestExampleObjectSchemas(t *testing.T) { "run-my-nginx": {&extensions.Deployment{}}, "cronjob": {&batch.CronJob{}}, }, - "../docs/admin": { - "daemon": {&extensions.DaemonSet{}}, - }, "../docs/user-guide/downward-api": { "dapi-pod": {&api.Pod{}}, "dapi-container-resources": {&api.Pod{}}, @@ -301,45 +353,51 @@ func TestExampleObjectSchemas(t *testing.T) { "dapi-volume": {&api.Pod{}}, "dapi-volume-resources": {&api.Pod{}}, }, - "../docs/admin/namespaces": { - "namespace-dev": {&api.Namespace{}}, - "namespace-prod": {&api.Namespace{}}, - }, - "../docs/admin/limitrange": { - "invalid-pod": {&api.Pod{}}, - "limits": {&api.LimitRange{}}, - "namespace": {&api.Namespace{}}, - "valid-pod": {&api.Pod{}}, + "../docs/user-guide/liveness": { + "exec-liveness": {&api.Pod{}}, + "http-liveness": {&api.Pod{}}, + "http-liveness-named-port": {&api.Pod{}}, }, "../docs/user-guide/node-selection": { "pod": {&api.Pod{}}, "pod-with-node-affinity": {&api.Pod{}}, "pod-with-pod-affinity": {&api.Pod{}}, }, - "../docs/admin/resourcequota": { - "best-effort": {&api.ResourceQuota{}}, - "compute-resources": {&api.ResourceQuota{}}, - "limits": {&api.LimitRange{}}, - "namespace": {&api.Namespace{}}, - "not-best-effort": {&api.ResourceQuota{}}, - "object-counts": {&api.ResourceQuota{}}, + "../docs/user-guide/persistent-volumes/volumes": { + "local-01": {&api.PersistentVolume{}}, + "local-02": {&api.PersistentVolume{}}, + "gce": {&api.PersistentVolume{}}, + "nfs": {&api.PersistentVolume{}}, + }, + "../docs/user-guide/persistent-volumes/claims": { + "claim-01": {&api.PersistentVolumeClaim{}}, + "claim-02": {&api.PersistentVolumeClaim{}}, + "claim-03": {&api.PersistentVolumeClaim{}}, + }, + "../docs/user-guide/persistent-volumes/simpletest": { + "namespace": {&api.Namespace{}}, + "pod": {&api.Pod{}}, + "service": {&api.Service{}}, }, "../docs/user-guide/secrets": { "secret-pod": {&api.Pod{}}, "secret": {&api.Secret{}}, "secret-env-pod": {&api.Pod{}}, }, - "../docs/tutorials/stateful-application": { - "gce-volume": {&api.PersistentVolume{}}, - "mysql-deployment": {&api.Service{}, &api.PersistentVolumeClaim{}, &extensions.Deployment{}}, - "mysql-services": {&api.Service{}, &api.Service{}}, - "mysql-configmap": {&api.ConfigMap{}}, - "mysql-statefulset": {&apps.StatefulSet{}}, - "cassandra-service": {&api.Service{}}, - "cassandra-statefulset": {&apps.StatefulSet{}, &storage.StorageClass{}}, - "web": {&api.Service{}, &apps.StatefulSet{}}, - "webp": {&api.Service{}, &apps.StatefulSet{}}, - "zookeeper": {&api.Service{}, &api.Service{}, &policy.PodDisruptionBudget{}, &apps.StatefulSet{}}, + "../docs/user-guide/update-demo": { + "kitten-rc": {&api.ReplicationController{}}, + "nautilus-rc": {&api.ReplicationController{}}, + }, + "../docs/user-guide/walkthrough": { + "deployment": {&extensions.Deployment{}}, + "deployment-update": {&extensions.Deployment{}}, + "pod-nginx": {&api.Pod{}}, + "pod-nginx-with-label": {&api.Pod{}}, + "pod-redis": {&api.Pod{}}, + "pod-with-http-healthcheck": {&api.Pod{}}, + "pod-with-tcp-socket-healthcheck": {&api.Pod{}}, + "podtemplate": {&api.PodTemplate{}}, + "service": {&api.Service{}}, }, }