@@ -151,7 +151,7 @@ An example request body:
|
||||
}
|
||||
```
|
||||
|
||||
The remote service is expected to fill the ImageReviewStatus field of the request and respond to either allow or disallow access. The response body’s "spec" field is ignored and may be omitted. A permissive response would return:
|
||||
The remote service is expected to fill the ImageReviewStatus field of the request and respond to either allow or disallow access. The response body's "spec" field is ignored and may be omitted. A permissive response would return:
|
||||
|
||||
```
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ Lars Kellogg-Stedman.
|
||||
|
||||
[Nuage](http://www.nuagenetworks.net) provides a highly scalable policy-based Software-Defined Networking (SDN) platform. Nuage uses the open source Open vSwitch for the data plane along with a feature rich SDN Controller built on open standards.
|
||||
|
||||
The Nuage platform uses overlays to provide seamless policy-based networking between Kubernetes Pods and non-Kubernetes environments (VMs and bare metal servers). Nuage’s policy abstraction model is designed with applications in mind and makes it easy to declare fine-grained policies for applications.The platform’s real-time analytics engine enables visibility and security monitoring for Kubernetes applications.
|
||||
The Nuage platform uses overlays to provide seamless policy-based networking between Kubernetes Pods and non-Kubernetes environments (VMs and bare metal servers). Nuage's policy abstraction model is designed with applications in mind and makes it easy to declare fine-grained policies for applications.The platform's real-time analytics engine enables visibility and security monitoring for Kubernetes applications.
|
||||
|
||||
### OpenVSwitch
|
||||
|
||||
|
||||
@@ -57,4 +57,3 @@ and have the following annotations specified:
|
||||
* `scheduler.alpha.kubernetes.io/tolerations` set to `[{"key":"CriticalAddonsOnly", "operator":"Exists"}]`
|
||||
|
||||
The first one marks a pod a critical. The second one is required by Rescheduler algorithm.
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ root 479 0.0 0.0 4348 812 ? S 00:05 0:00 sleep 1
|
||||
root 480 0.0 0.0 15572 2212 ? R 00:05 0:00 ps aux
|
||||
```
|
||||
|
||||
What happens if for any reason the image in this pod is killed off and then restarted by Kubernetes? Will we still see the log lines from the previous invocation of the container followed by the log lines for the started container? Or will we lose the log lines from the original container's execution and only see the log lines for the new container? Let’s find out. First let's delete the currently running counter.
|
||||
What happens if for any reason the image in this pod is killed off and then restarted by Kubernetes? Will we still see the log lines from the previous invocation of the container followed by the log lines for the started container? Or will we lose the log lines from the original container's execution and only see the log lines for the new container? Let's find out. First let's delete the currently running counter.
|
||||
|
||||
```shell
|
||||
$ kubectl delete pod counter
|
||||
|
||||
@@ -17,12 +17,12 @@ Thankfully, there is a system we can use to manage our containers in a cluster e
|
||||
|
||||
## The Basics of Using Kubernetes
|
||||
|
||||
Before we jump in and start kube’ing it up, it’s important to understand some of the fundamentals of Kubernetes.
|
||||
Before we jump in and start kube'ing it up, it's important to understand some of the fundamentals of Kubernetes.
|
||||
|
||||
* Containers: These are the Docker, rtk, AppC, or whatever Container you are running. You can think of these like subatomic particles; everything is made up of them, but you rarely (if ever) interact with them directly.
|
||||
* Pods: Pods are the basic component of Kubernetes. They are a group of Containers that are scheduled, live, and die together. Why would you want to have a group of containers instead of just a single container? Let’s say you had a log processor, a web server, and a database. If you couldn't use Pods, you would have to bundle the log processor in the web server and database containers, and each time you updated one you would have to update the other. With Pods, you can just reuse the same log processor for both the web server and database.
|
||||
* Pods: Pods are the basic component of Kubernetes. They are a group of Containers that are scheduled, live, and die together. Why would you want to have a group of containers instead of just a single container? Let's say you had a log processor, a web server, and a database. If you couldn't use Pods, you would have to bundle the log processor in the web server and database containers, and each time you updated one you would have to update the other. With Pods, you can just reuse the same log processor for both the web server and database.
|
||||
* Deployments: A Deployment provides declarative updates for Pods. You can define Deployments to create new Pods, or replace existing Pods. You only need to describe the desired state in a Deployment object, and the deployment controller will change the actual state to the desired state at a controlled rate for you. You can define Deployments to create new resources, or replace existing ones by new ones.
|
||||
* Services: A service is the single point of contact for a group of Pods. For example, let’s say you have a Deployment that creates four copies of a web server pod. A Service will split the traffic to each of the four copies. Services are "permanent" while the pods behind them can come and go, so it’s a good idea to use Services.
|
||||
* Services: A service is the single point of contact for a group of Pods. For example, let's say you have a Deployment that creates four copies of a web server pod. A Service will split the traffic to each of the four copies. Services are "permanent" while the pods behind them can come and go, so it's a good idea to use Services.
|
||||
|
||||
|
||||
## Step 1: Creating the Container
|
||||
@@ -37,7 +37,7 @@ To do this, you need to use more Docker. Make sure you have the latest version i
|
||||
|
||||
Getting the code:
|
||||
|
||||
Before starting, let’s get some code to run. You can follow along on your personal machine or a Linux VM in the cloud. I recommend using Linux or a Linux VM; running Docker on Mac and Windows is outside the scope of this tutorial.
|
||||
Before starting, let's get some code to run. You can follow along on your personal machine or a Linux VM in the cloud. I recommend using Linux or a Linux VM; running Docker on Mac and Windows is outside the scope of this tutorial.
|
||||
|
||||
```shell
|
||||
$ git clone https://github.com/ijason/NodeJS-Sample-App.git app
|
||||
@@ -45,7 +45,7 @@ $ mv app/EmployeeDB/* app/
|
||||
$ sed -i -- 's/localhost/mongo/g' ./app/app.js
|
||||
```
|
||||
|
||||
This is the same sample app we ran before. The second line just moves everything from the `EmployeeDB` subfolder up into the app folder so it’s easier to access. The third line, once again, replaces the hardcoded `localhost` with the `mongo` proxy.
|
||||
This is the same sample app we ran before. The second line just moves everything from the `EmployeeDB` subfolder up into the app folder so it's easier to access. The third line, once again, replaces the hardcoded `localhost` with the `mongo` proxy.
|
||||
|
||||
Building the Docker image:
|
||||
|
||||
@@ -83,7 +83,7 @@ $ ls
|
||||
Dockerfile app
|
||||
```
|
||||
|
||||
Let’s build.
|
||||
Let's build.
|
||||
|
||||
```shell
|
||||
$ docker build -t myapp .
|
||||
@@ -139,7 +139,7 @@ After some time, it will finish. You can check the console to see the container
|
||||
|
||||
## **Step 4: Creating the Cluster**
|
||||
|
||||
So now you have the custom container, let’s create a cluster to run it.
|
||||
So now you have the custom container, let's create a cluster to run it.
|
||||
|
||||
Currently, a cluster can be as small as one machine to as big as 100 machines. You can pick any machine type you want, so you can have a cluster of a single `f1-micro` instance, 100 `n1-standard-32` instances (3,200 cores!), and anything in between.
|
||||
|
||||
@@ -193,7 +193,7 @@ $ gcloud compute disks create \
|
||||
|
||||
Pick the same zone as your cluster and an appropriate disk size for your application.
|
||||
|
||||
Now, we need to create a Deployment that will run the database. I’m using a Deployment and not a Pod, because if a standalone Pod dies, it won't restart automatically.
|
||||
Now, we need to create a Deployment that will run the database. I'm using a Deployment and not a Pod, because if a standalone Pod dies, it won't restart automatically.
|
||||
|
||||
### `db-deployment.yml`
|
||||
|
||||
@@ -231,7 +231,7 @@ We call the deployment `mongo-deployment`, specify one replica, and open the app
|
||||
|
||||
The `volumes` section creates the volume for Kubernetes to use. There is a Google Container Engine-specific `gcePersistentDisk` section that maps the disk we made into a Kubernetes volume, and we mount the volume into the `/data/db` directory (as described in the MongoDB Docker documentation)
|
||||
|
||||
Now we have the Deployment, let’s create the Service:
|
||||
Now we have the Deployment, let's create the Service:
|
||||
|
||||
### `db-service.yml`
|
||||
|
||||
@@ -267,7 +267,7 @@ db-service.yml
|
||||
|
||||
## Step 6: Running the Database
|
||||
|
||||
First, let’s "log in" to the cluster
|
||||
First, let's "log in" to the cluster
|
||||
|
||||
```shell
|
||||
$ gcloud container clusters get-credentials mean-cluster
|
||||
@@ -305,14 +305,14 @@ mongo-deployment-xxxx 1/1 Running 0 3m
|
||||
|
||||
## Step 7: Creating the Web Server
|
||||
|
||||
Now the database is running, let’s start the web server.
|
||||
Now the database is running, let's start the web server.
|
||||
|
||||
We need two things:
|
||||
|
||||
1. Deployment to spin up and down web server pods
|
||||
2. Service to expose our website to the interwebs
|
||||
|
||||
Let’s look at the Deployment configuration:
|
||||
Let's look at the Deployment configuration:
|
||||
|
||||
### `web-deployment.yml`
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ In Kubernetes version 1.5, Windows Server Containers for Kubernetes is supported
|
||||
4. Docker Version 1.12.2-cs2-ws-beta or later for Windows Server nodes (Linux nodes and Kubernetes control plane can run any Kubernetes supported Docker Version)
|
||||
|
||||
## Networking
|
||||
Network is achieved using L3 routing. Because third-party networking plugins (e.g. flannel, calico, etc) don’t natively work on Windows Server, existing technology that is built into the Windows and Linux operating systems is relied on. In this L3 networking approach, a /16 subnet is chosen for the cluster nodes, and a /24 subnet is assigned to each worker node. All pods on a given worker node will be connected to the /24 subnet. This allows pods on the same node to communicate with each other. In order to enable networking between pods running on different nodes, routing features that are built into Windows Server 2016 and Linux are used.
|
||||
Network is achieved using L3 routing. Because third-party networking plugins (e.g. flannel, calico, etc) don't natively work on Windows Server, existing technology that is built into the Windows and Linux operating systems is relied on. In this L3 networking approach, a /16 subnet is chosen for the cluster nodes, and a /24 subnet is assigned to each worker node. All pods on a given worker node will be connected to the /24 subnet. This allows pods on the same node to communicate with each other. In order to enable networking between pods running on different nodes, routing features that are built into Windows Server 2016 and Linux are used.
|
||||
|
||||
### Linux
|
||||
The above networking approach is already supported on Linux using a bridge interface, which essentially creates a private network local to the node. Similar to the Windows side, routes to all other pod CIDRs must be created in order to send packets via the "public" NIC.
|
||||
|
||||
+11
-11
@@ -12,7 +12,7 @@ title: Hello World on Google Container Engine
|
||||
|
||||
The goal of this codelab is for you to turn a simple Hello World node.js app into a replicated application running on Kubernetes. We will show you how to take code that you have developed on your machine, turn it into a Docker container image, and then run that image on [Google Container Engine](https://cloud.google.com/container-engine/).
|
||||
|
||||
Here’s a diagram of the various parts in play in this codelab to help you understand how pieces fit with one another. Use this as a reference as we progress through the codelab; it should all make sense by the time we get to the end.
|
||||
Here's a diagram of the various parts in play in this codelab to help you understand how pieces fit with one another. Use this as a reference as we progress through the codelab; it should all make sense by the time we get to the end.
|
||||
|
||||

|
||||
|
||||
@@ -38,7 +38,7 @@ export PROJECT_ID="your-project-id"
|
||||
|
||||
Next, [enable billing](https://console.cloud.google.com/billing) in the Cloud Console in order to use Google Cloud resources and [enable the Container Engine API](https://console.cloud.google.com/project/_/kubernetes/list).
|
||||
|
||||
New users of Google Cloud Platform receive a [$300 free trial](https://console.cloud.google.com/billing/freetrial?hl=en). Running through this codelab shouldn’t cost you more than a few dollars of that trial. Google Container Engine pricing is documented [here](https://cloud.google.com/container-engine/pricing).
|
||||
New users of Google Cloud Platform receive a [$300 free trial](https://console.cloud.google.com/billing/freetrial?hl=en). Running through this codelab shouldn't cost you more than a few dollars of that trial. Google Container Engine pricing is documented [here](https://cloud.google.com/container-engine/pricing).
|
||||
|
||||
Next, make sure you [download Node.js](https://nodejs.org/en/download/). You can skip this and the steps for installing Docker and Cloud SDK if you're using Cloud Shell.
|
||||
|
||||
@@ -79,7 +79,7 @@ You should be able to see your "Hello World!" message at http://localhost:8080/.
|
||||
|
||||
Stop the running node server by pressing Ctrl-C.
|
||||
|
||||
Now let’s package this application in a Docker container.
|
||||
Now let's package this application in a Docker container.
|
||||
|
||||
## Create a Docker container image
|
||||
|
||||
@@ -109,7 +109,7 @@ Let's try your image out with Docker:
|
||||
docker run -d -p 8080:8080 --name hello_tutorial gcr.io/$PROJECT_ID/hello-node:v1
|
||||
```
|
||||
|
||||
Visit your app in the browser, or use `curl` or `wget` if you’d like :
|
||||
Visit your app in the browser, or use `curl` or `wget` if you'd like :
|
||||
|
||||
```shell
|
||||
curl http://localhost:8080
|
||||
@@ -123,7 +123,7 @@ You should see `Hello World!`
|
||||
curl "http://$(docker-machine ip YOUR-VM-MACHINE-NAME):8080"
|
||||
```
|
||||
|
||||
Let’s now stop the container. You can list the docker containers with:
|
||||
Let's now stop the container. You can list the docker containers with:
|
||||
|
||||
```shell
|
||||
docker ps
|
||||
@@ -180,7 +180,7 @@ You should get a Kubernetes cluster with three nodes, ready to receive your cont
|
||||
|
||||

|
||||
|
||||
It’s now time to deploy your own containerized application to the Kubernetes cluster!
|
||||
It's now time to deploy your own containerized application to the Kubernetes cluster!
|
||||
|
||||
```shell
|
||||
gcloud container clusters get-credentials hello-world
|
||||
@@ -258,7 +258,7 @@ kubectl expose deployment hello-node --type="LoadBalancer"
|
||||
|
||||
**If this fails, make sure your client and server are both version 1.3. See the [Create your cluster](#create-your-cluster) section for details.**
|
||||
|
||||
The flag used in this command specifies that we’ll be using the load-balancer provided by the underlying infrastructure (in this case the [Compute Engine load balancer](https://cloud.google.com/compute/docs/load-balancing/)). Note that we expose the deployment, and not the pod directly. This will cause the resulting service to load balance traffic across all pods managed by the deployment (in this case only 1 pod, but we will add more replicas later).
|
||||
The flag used in this command specifies that we'll be using the load-balancer provided by the underlying infrastructure (in this case the [Compute Engine load balancer](https://cloud.google.com/compute/docs/load-balancing/)). Note that we expose the deployment, and not the pod directly. This will cause the resulting service to load balance traffic across all pods managed by the deployment (in this case only 1 pod, but we will add more replicas later).
|
||||
|
||||
The Kubernetes master creates the load balancer and related Compute Engine forwarding rules, target pools, and firewall rules to make the service fully accessible from outside of Google Cloud Platform.
|
||||
|
||||
@@ -322,7 +322,7 @@ hello-node-714049816-ztzrb 1/1 Running 0 41m
|
||||
|
||||
Note the **declarative approach** here - rather than starting or stopping new instances you declare how many instances you want to be running. Kubernetes reconciliation loops simply make sure the reality matches what you requested and take action if needed.
|
||||
|
||||
Here’s a diagram summarizing the state of our Kubernetes cluster:
|
||||
Here's a diagram summarizing the state of our Kubernetes cluster:
|
||||
|
||||

|
||||
|
||||
@@ -330,7 +330,7 @@ Here’s a diagram summarizing the state of our Kubernetes cluster:
|
||||
|
||||
As always, the application you deployed to production requires bug fixes or additional features. Kubernetes is here to help you deploy a new version to production without impacting your users.
|
||||
|
||||
First, let’s modify the application. On the development machine, edit server.js and update the response message:
|
||||
First, let's modify the application. On the development machine, edit server.js and update the response message:
|
||||
|
||||
```javascript
|
||||
response.end('Hello Kubernetes World!');
|
||||
@@ -345,7 +345,7 @@ gcloud docker -- push gcr.io/$PROJECT_ID/hello-node:v2
|
||||
|
||||
Building and pushing this updated image should be much quicker as we take full advantage of the Docker cache.
|
||||
|
||||
We’re now ready for Kubernetes to smoothly update our deployment to the new version of the application. In order to change
|
||||
We're now ready for Kubernetes to smoothly update our deployment to the new version of the application. In order to change
|
||||
the image label for our running container, we will need to edit the existing *hello-node deployment* and change the image from
|
||||
`gcr.io/$PROJECT_ID/hello-node:v1` to `gcr.io/$PROJECT_ID/hello-node:v2`. To do this, we will use the `kubectl set image` command.
|
||||
|
||||
@@ -364,7 +364,7 @@ hello-node 4 5 4 3 1h
|
||||
|
||||
While this is happening, the users of the services should not see any interruption. After a little while they will start accessing the new version of your application. You can find more details in the [deployment documentation](/docs/user-guide/deployments/).
|
||||
|
||||
Hopefully with these deployment, scaling and update features you’ll agree that once you’ve setup your environment (your GKE/Kubernetes cluster here), Kubernetes is here to help you focus on the application rather than the infrastructure.
|
||||
Hopefully with these deployment, scaling and update features you'll agree that once you've setup your environment (your GKE/Kubernetes cluster here), Kubernetes is here to help you focus on the application rather than the infrastructure.
|
||||
|
||||
## Observe the Kubernetes Web UI (optional)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ title: Using Minikube to Create a Cluster
|
||||
|
||||
<p>A Kubernetes cluster can be deployed on either physical or virtual machines. To get started with Kubernetes development, you can use <a href="https://github.com/kubernetes/minikube">Minikube</a>. Minikube is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, Mac OS and Windows systems. The Minikube CLI provides basic bootstrapping operations for working with your cluster, including start, stop, status, and delete. For this bootcamp, however, you'll use a provided online terminal with Minikube pre-installed.</p>
|
||||
|
||||
<p>Now that you know what Kubernetes is, let’s go to the online tutorial and start our first cluster!</p>
|
||||
<p>Now that you know what Kubernetes is, let's go to the online tutorial and start our first cluster!</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,9 +86,9 @@ title: Using kubectl to Create a Deployment
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p>For our first Deployment, we’ll use a <a href="https://nodejs.org">Node.js</a> application packaged in a Docker container. The source code and the Dockerfile are available in the <a href="https://github.com/kubernetes/kubernetes-bootcamp">GitHub repository</a> for the Kubernetes Bootcamp.</p>
|
||||
<p>For our first Deployment, we'll use a <a href="https://nodejs.org">Node.js</a> application packaged in a Docker container. The source code and the Dockerfile are available in the <a href="https://github.com/kubernetes/kubernetes-bootcamp">GitHub repository</a> for the Kubernetes Bootcamp.</p>
|
||||
|
||||
<p>Now that you know what Deployments are, let’s go to the online tutorial and deploy our first app!</p>
|
||||
<p>Now that you know what Deployments are, let's go to the online tutorial and deploy our first app!</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,7 +117,7 @@ title: Viewing Pods and Nodes
|
||||
|
||||
<p>You can use these commands to see when applications were deployed, what their current statuses are, where they are running and what their configurations are.</p>
|
||||
|
||||
<p>Now that we know more about our cluster components and the command line, let’s explore our application.</p>
|
||||
<p>Now that we know more about our cluster components and the command line, let's explore our application.</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
@@ -28,7 +28,7 @@ title: Using a Service to Expose Your App
|
||||
<div class="col-md-8">
|
||||
<h3>Kubernetes Services</h3>
|
||||
|
||||
<p>While Pods do have their own unique IP across the cluster, those IP’s are not exposed outside Kubernetes. Taking into account that over time Pods may be terminated, deleted or replaced by other Pods, we need a way to let other Pods and applications automatically discover each other. Kubernetes addresses this by grouping Pods in Services. A Kubernetes <b>Service</b> is an abstraction layer which defines a logical set of Pods and enables external traffic exposure, load balancing and service discovery for those Pods.</p>
|
||||
<p>While Pods do have their own unique IP across the cluster, those IP's are not exposed outside Kubernetes. Taking into account that over time Pods may be terminated, deleted or replaced by other Pods, we need a way to let other Pods and applications automatically discover each other. Kubernetes addresses this by grouping Pods in Services. A Kubernetes <b>Service</b> is an abstraction layer which defines a logical set of Pods and enables external traffic exposure, load balancing and service discovery for those Pods.</p>
|
||||
|
||||
<p>This abstraction will allow us to expose Pods to traffic originating from outside the cluster. Services have their own unique cluster-private IP address and expose a port to receive traffic. If you choose to expose the service outside the cluster, the options are:</p>
|
||||
<ul>
|
||||
@@ -70,7 +70,7 @@ title: Using a Service to Expose Your App
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
<p>A Service provides load balancing of traffic across the contained set of Pods. This is useful when a service is created to group all Pods from a specific Deployment (our application will make use of this in the next module, when we’ll have multiple instances running).</p>
|
||||
<p>A Service provides load balancing of traffic across the contained set of Pods. This is useful when a service is created to group all Pods from a specific Deployment (our application will make use of this in the next module, when we'll have multiple instances running).</p>
|
||||
|
||||
<p>Services are also responsible for service-discovery within the cluster (covered in <a href="/docs/user-guide/connecting-applications/#accessing-the-service">Accessing the Service</a>). This will for example allow a frontend service (like a web server) to receive traffic from a backend service (like a database) without worrying about Pods.</p>
|
||||
|
||||
@@ -120,7 +120,7 @@ title: Using a Service to Expose Your App
|
||||
<p>Labels can be attached to objects at the creation time or later and can be modified at any time.
|
||||
The kubectl run command sets some default Labels/Label Selectors on the new Pods/ Deployment. The link between Labels and Label Selectors defines the relationship between the Deployment and the Pods it creates.</p>
|
||||
|
||||
<p>Now let’s expose our application with the help of a Service, and apply some new Labels.</p>
|
||||
<p>Now let's expose our application with the help of a Service, and apply some new Labels.</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -101,7 +101,7 @@ title: Running Multiple Instances of Your App
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p> Once you have multiple instances of an Application running, you would be able to do Rolling updates without downtime. We’ll cover that in the next module. Now, let’s go to the online terminal and scale our application.</p>
|
||||
<p> Once you have multiple instances of an Application running, you would be able to do Rolling updates without downtime. We'll cover that in the next module. Now, let's go to the online terminal and scale our application.</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -116,7 +116,7 @@ title: Performing a Rolling Update
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<p> In the following interactive tutorial we’ll update our application to a new version, and also perform a rollback.</p>
|
||||
<p> In the following interactive tutorial we'll update our application to a new version, and also perform a rollback.</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -173,7 +173,7 @@ zk-2
|
||||
```
|
||||
|
||||
The servers in a ZooKeeper ensemble use natural numbers as unique identifiers, and
|
||||
each server's identifier is stored in a file called `myid` in the server’s
|
||||
each server's identifier is stored in a file called `myid` in the server's
|
||||
data directory.
|
||||
|
||||
Examine the contents of the `myid` file for each server.
|
||||
|
||||
@@ -75,7 +75,7 @@ apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: hello-world
|
||||
spec: # specification of the pod’s contents
|
||||
spec: # specification of the pod's contents
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: hello
|
||||
|
||||
@@ -396,7 +396,7 @@ spec:
|
||||
|
||||
The patch is specified using json.
|
||||
|
||||
The system ensures that you don’t clobber changes made by other users or components by confirming that the `resourceVersion` doesn’t differ from the version you edited. If you want to update regardless of other changes, remove the `resourceVersion` field when you edit the resource. However, if you do this, don’t use your original configuration file as the source since additional fields most likely were set in the live state.
|
||||
The system ensures that you don't clobber changes made by other users or components by confirming that the `resourceVersion` doesn't differ from the version you edited. If you want to update regardless of other changes, remove the `resourceVersion` field when you edit the resource. However, if you do this, don't use your original configuration file as the source since additional fields most likely were set in the live state.
|
||||
|
||||
For more information, please see [kubectl patch](/docs/user-guide/kubectl/kubectl_patch/) document.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ administrator to control the following:
|
||||
1. The SELinux context of the container.
|
||||
1. The user ID.
|
||||
1. The use of host namespaces and networking.
|
||||
1. Allocating an FSGroup that owns the pod’s volumes
|
||||
1. Allocating an FSGroup that owns the pod's volumes
|
||||
1. Configuring allowable supplemental groups
|
||||
1. Requiring the use of a read only root file system
|
||||
1. Controlling the usage of volume types
|
||||
|
||||
@@ -5,7 +5,7 @@ assignees:
|
||||
title: Installing and Setting up kubectl
|
||||
---
|
||||
|
||||
To deploy and manage applications on Kubernetes, you’ll use the Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/). It lets you inspect your cluster resources, create, delete, and update components, and much more. You will use it to look at your new cluster and bring up example apps.
|
||||
To deploy and manage applications on Kubernetes, you'll use the Kubernetes command-line tool, [kubectl](/docs/user-guide/kubectl/). It lets you inspect your cluster resources, create, delete, and update components, and much more. You will use it to look at your new cluster and bring up example apps.
|
||||
|
||||
## Install kubectl Binary Via curl
|
||||
|
||||
|
||||
@@ -233,8 +233,8 @@ object](/docs/api-reference/v1/definitions/#_v1_replicationcontroller).
|
||||
### ReplicaSet
|
||||
|
||||
[`ReplicaSet`](/docs/user-guide/replicasets/) is the next-generation Replication Controller that supports the new [set-based label selector](/docs/user-guide/labels/#set-based-requirement).
|
||||
It’s mainly used by [`Deployment`](/docs/user-guide/deployments/) as a mechanism to orchestrate pod creation, deletion and updates.
|
||||
Note that we recommend using Deployments instead of directly using Replica Sets, unless you require custom update orchestration or don’t require updates at all.
|
||||
It's mainly used by [`Deployment`](/docs/user-guide/deployments/) as a mechanism to orchestrate pod creation, deletion and updates.
|
||||
Note that we recommend using Deployments instead of directly using Replica Sets, unless you require custom update orchestration or don't require updates at all.
|
||||
|
||||
### Deployment (Recommended)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ metadata:
|
||||
name: hello-world
|
||||
spec:
|
||||
containers:
|
||||
# specification of the pod’s containers
|
||||
# specification of the pod's containers
|
||||
# ...
|
||||
securityContext:
|
||||
fsGroup: 1234
|
||||
@@ -85,4 +85,3 @@ Please refer to the
|
||||
[API documentation](/docs/api-reference/v1/definitions/#_v1_securitycontext)
|
||||
for a detailed listing and description of all the fields available
|
||||
within the container security context.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user