You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.html
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ <h3>Kubernetes Deployments</h3>
37
37
38
38
<p>Once the application instances are created, a Kubernetes Deployment controller continuously monitors those instances. If the Node hosting an instance goes down or is deleted, the Deployment controller replaces the instance with an instance on another Node in the cluster. <b>This provides a self-healing mechanism to address machine failure or maintenance.</b></p>
39
39
40
-
<p>In a pre-orchestration world, installation scripts would often be used to start applications, but they did not allow recovery from machine failure. By both creating your application instances and keeping them running across Nodes, Kubernetes Deployments provide a fundamentally different approach to application management.</p>
40
+
<p>In a pre-orchestration world, installation scripts would often be used to start applications, but they did not allow recovery from machine failure. By both creating your application instances and keeping them running across Nodes, Kubernetes Deployments provide a fundamentally different approach to application management.</p>
41
41
42
42
</div>
43
43
@@ -74,7 +74,7 @@ <h2 style="color: #3771e3;">Deploying your first app on Kubernetes</h2>
74
74
<divclass="row">
75
75
<divclass="col-md-8">
76
76
77
-
<p>You can create and manage a Deployment by using the Kubernetes command line interface, <b>kubectl</b>. Kubectl uses the Kubernetes API to interact with the cluster. In this module, you'll learn the most common Kubectl commands needed to create Deployments that run your applications on a Kubernetes cluster.</p>
77
+
<p>You can create and manage a Deployment by using the Kubernetes command line interface, <b>kubectl</b>. Kubectl uses the Kubernetes API to interact with the cluster. In this module, you'll learn the most common kubectl commands needed to create Deployments that run your applications on a Kubernetes cluster.</p>
78
78
79
79
<p>When you create a Deployment, you'll need to specify the container image for your application and the number of replicas that you want to run. You can change that information later by updating your Deployment; Modules <ahref="/docs/tutorials/kubernetes-basics/scale/scale-intro/">5</a> and <ahref="/docs/tutorials/kubernetes-basics/update/update-intro/">6</a> of the bootcamp discuss how you can scale and update your Deployments.</p>
80
80
@@ -103,7 +103,7 @@ <h2 style="color: #3771e3;">Deploying your first app on Kubernetes</h2>
103
103
<divclass="col-md-8">
104
104
<h3>kubectl basics</h3>
105
105
<p>The common format of a kubectl command is: <code>kubectl <i>action resource</i></code></p>
106
-
<p>This performs the specified <em>action</em> (like create, describe or delete) on the specified <em>resource</em> (like <tt>node</tt> or <tt>deployment</tt>). You can use <code>-<span/>-help</code> after the subcommand to get additional info about possible parameters (for example: <code>kubectl get nodes --help</code>).</p>
106
+
<p>This performs the specified <em>action</em> (like <tt>create</tt>, <tt>describe</tt> or <tt>delete</tt>) on the specified <em>resource</em> (like <tt>node</tt> or <tt>deployment</tt>). You can use <code>-<span/>-help</code> after the subcommand to get additional info about possible parameters (for example: <code>kubectl get nodes --help</code>).</p>
107
107
<p>Check that kubectl is configured to talk to your cluster, by running the <b><code>kubectl version</code></b> command.</p>
108
108
<p>Check that kubectl is installed and you can see both the client and the server versions.</p>
109
109
<p>To view the nodes in the cluster, run the <b><code>kubectl get nodes</code></b> command.</p>
@@ -114,7 +114,7 @@ <h3>kubectl basics</h3>
114
114
<divclass="col-md-12">
115
115
<aid="deploy-an-app"></a>
116
116
<h3>Deploy an app</h3>
117
-
<p>Let’s deploy our first app on Kubernetes with the <code>kubectl create deployment</code> command. We need to provide the deployment name and app image location (include the full repository url for images hosted outside Docker hub).</p>
117
+
<p>Let’s deploy our first app on Kubernetes with the <code>kubectl create deployment</code> command. We need to provide the deployment name and app image location (include the full repository url for images hosted outside Docker Hub).</p>
<p>Great! You just deployed your first application by creating a deployment. This performed a few things for you:</p>
120
120
<ul>
@@ -131,23 +131,23 @@ <h3>Deploy an app</h3>
131
131
<divclass="col-md-12">
132
132
<h3>View the app</h3>
133
133
<p>Pods that are running inside Kubernetes are running on a private, isolated network.
134
-
By default they are visible from other pods and services within the same kubernetes cluster, but not outside that network.
134
+
By default they are visible from other pods and services within the same Kubernetes cluster, but not outside that network.
135
135
When we use <code>kubectl</code>, we're interacting through an API endpoint to communicate with our application.</p>
136
-
<p>We will cover other options on how to expose your application outside the kubernetes cluster in Module 4.</p>
137
-
<p>The <code>kubectl</code> command can create a proxy that will forward communications into the cluster-wide, private network. The proxy can be terminated by pressing control-C and won't show any output while its running.</p>
136
+
<p>We will cover other options on how to expose your application outside the Kubernetes cluster later, in <ahref="/docs/tutorials/kubernetes-basics/expose/">Module 4</a>.</p>
137
+
<p>The <code>kubectl proxy</code> command can create a proxy that will forward communications into the cluster-wide, private network. The proxy can be terminated by pressing control-C and won't show any output while its running.</p>
138
138
<p><strong>You need to open a second terminal window to run the proxy.</strong></p>
139
139
<p><b><code>kubectl proxy</b></code>
140
-
<p>We now have a connection between our host (the online terminal) and the Kubernetes cluster. The proxy enables direct access to the API from these terminals.</p>
140
+
<p>We now have a connection between our host (the terminal) and the Kubernetes cluster. The proxy enables direct access to the API from these terminals.</p>
141
141
<p>You can see all those APIs hosted through the proxy endpoint. For example, we can query the version directly through the API using the <code>curl</code> command:</p>
<divclass="alert alert-info note callout" role="alert"><strong>Note:</strong> If Port 8001 is not accessible, ensure that the <code>kubectl proxy</code> that you started above is running in the second terminal.</div>
143
+
<divclass="alert alert-info note callout" role="alert"><strong>Note:</strong> If port 8001 is not accessible, ensure that the <code>kubectl proxy</code> that you started above is running in the second terminal.</div>
144
144
<p>The API server will automatically create an endpoint for each pod, based on the pod name, that is also accessible through the proxy.</p>
145
145
<p>First we need to get the Pod name, and we'll store in the environment variable <tt>POD_NAME</tt>:</p>
146
146
<p><b><code>export POD_NAME=$(kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')</code></b><br/>
147
147
<b><code>echo Name of the Pod: $POD_NAME</code></b></p>
148
148
<p>You can access the Pod through the proxied API, by running:</p>
<p>In order for the new Deployment to be accessible without using the proxy, a Service is required which will be explained in the next modules.</p>
150
+
<p>In order for the new Deployment to be accessible without using the proxy, a Service is required which will be explained in <ahref="/docs/tutorials/kubernetes-basics/expose/">Module 4</a>.</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 section of the tutorial. Now, let's go to the online terminal and scale our application.</p>
106
+
<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 section of the tutorial. Now, let's go to the terminal and scale our application.</p>
107
107
</div>
108
108
</div>
109
109
110
110
<divclass="row">
111
111
<divclass="col-md-12">
112
-
<h3>Scaling a deployment</h3>
113
-
<p>To list your deployments use the <code>get deployments</code> subcommand:
112
+
<h3>Scaling a Deployment</h3>
113
+
<p>To list your Deployments use the <code>get deployments</code> subcommand:
114
114
<code><b>kubectl get deployments</b></code></p>
115
115
<p>The output should be similar to:</p>
116
116
<pre>
@@ -133,7 +133,7 @@ <h3>Scaling a deployment</h3>
133
133
<li><em>DESIRED</em> displays the desired number of replicas of the application, which you define when you create the Deployment. This is the desired state.</li>
134
134
<li><em>CURRENT</em> displays how many replicas are currently running.</li>
135
135
</ul>
136
-
<p>Next, let’s scale the Deployment to 4 replicas. We’ll use the <code>kubectl scale</code> command, followed by the deployment type, name and desired number of instances:</p>
136
+
<p>Next, let’s scale the Deployment to 4 replicas. We’ll use the <code>kubectl scale</code> command, followed by the Deployment type, name and desired number of instances:</p>
0 commit comments