-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.xml
93 lines (67 loc) · 8.59 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>RebyrgsBlog | Dev site of DevOps blog</title>
<description>Dev site of DevOps blog by Rebyrg.</description>
<link>https://rebyrg.github.io/</link>
<atom:link href="https://rebyrg.github.io/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Tue, 14 Jan 2020 22:43:22 +0100</pubDate>
<lastBuildDate>Tue, 14 Jan 2020 22:43:22 +0100</lastBuildDate>
<generator>Jekyll v3.8.6</generator>
<item>
<title>Kubernetes demo</title>
<description><p>My notes made to demonstrate kubernetes features. The demo was in July 2017 for develelopers in company I work for. I did it for people who didn’t know what container and kubernetes are. I tried to encourage them to start their adventure with kubernets. Source code: <a href="https://github.com/Rebyrg/k8s-demo">https://github.com/Rebyrg/k8s-demo</a></p> <h1 id="application">Application</h1> <p>It is a very simple spring boot application created for demonstration of basic kubernetes features. It also shows basic principles of creating spring boot applications which are deployed on a kubernetes cluster.</p> <p>The application exposes only one simple service <code class="highlighter-rouge">/rate</code> on spring boot http port (default 8080). The rate...</description>
<pubDate>Sun, 16 Jul 2017 01:48:05 +0200</pubDate>
<link>https://rebyrg.github.io/kubernetes-demo/</link>
<guid isPermaLink="true">https://rebyrg.github.io/kubernetes-demo/</guid>
<category>kubernetes</category>
<category>blog</category>
<category>java</category>
<category>kubernetes</category>
</item>
<item>
<title>Kubernetes demo</title>
<description><h1 id="demonstration-scenario">Demonstration scenario</h1> <h2 id="prerequirements">Prerequirements</h2> <h3 id="1-before-you-begin-ensure-that-you-have-installed-on-your-pc">1. Before you begin ensure that you have installed on your PC:</h3> <ul> <li>Java SDK 1.8</li> <li>maven</li> <li>Docker</li> <li>kubectl</li> <li><a href="https://github.com/kubernetes/minikube">minikube</a></li> </ul> <h3 id="2-configure-minikube-add-heapster-addon-and-connect-its-docker-demon">2. Configure minikube - add heapster addon and connect its docker demon:</h3> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>minikube addons enable heapster minikube start eval $(minikube docker-env) </code></pre></div></div> <h3 id="3-build-the-application-and-the-docker-image">3. Build the application and the docker image:</h3> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mvn clean package docker build -t k8s-demo-currency-provider:0.0.1 . </code></pre></div></div> <p>You don’t have to push docker image to a registry thanks to using <code class="highlighter-rouge">eval $(minikube docker-env)</code> and imagePullPolicy set to IfNotPresent in all examples...</description>
<pubDate>Sun, 16 Jul 2017 01:48:05 +0200</pubDate>
<link>https://rebyrg.github.io/kubernetes-demo/2/</link>
<guid isPermaLink="true">https://rebyrg.github.io/kubernetes-demo/2/</guid>
<category>kubernetes</category>
<category>blog</category>
<category>java</category>
<category>kubernetes</category>
</item>
<item>
<title>Kubernetes demo</title>
<description><h2 id="scale-the-application">Scale the application</h2> <h4 id="availlability-and-response-test">Availlability and response test</h4> <p>Test described below will be used also in further sections for demonstration various features of kubernetes. In the new terminal execute below script.</p> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>export DEMO_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}") export DEMO_PORT=$(kubectl get services k8s-demo-currency-provider -o jsonpath="{.spec.ports[0].nodePort}") while true; do sleep 1; curl --max-time 1 "$DEMO_IP:$DEMO_PORT/rate?source=EUR&amp;destination=USD"; echo -e ' -&gt; '$(date); done </code></pre></div></div> <p>It will call our service and prints ones a second result in the terminal. Script checks whether application is available by printing content of the rate service. The curl command waits only 1 second for an...</description>
<pubDate>Sun, 16 Jul 2017 01:48:05 +0200</pubDate>
<link>https://rebyrg.github.io/kubernetes-demo/3/</link>
<guid isPermaLink="true">https://rebyrg.github.io/kubernetes-demo/3/</guid>
<category>kubernetes</category>
<category>blog</category>
<category>java</category>
<category>kubernetes</category>
</item>
<item>
<title>Kubernetes demo</title>
<description><h2 id="horizontal-pod-autoscaling-hpa">Horizontal pod autoscaling - HPA</h2> <p>HPA needs resources to be configured in the deployment descriptor for running. Edit k8s-demo-currency-provider deployment and add resources configuration. Run <code class="highlighter-rouge">kubectl edit deployment k8s-demo-currency-provider</code> and in the editor place below text in container section:</p> <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> resources: limits: cpu: 500m memory: 300Mi requests: cpu: 250m memory: 200Mi </code></pre></div></div> <p>File <code class="highlighter-rouge">k8s/k8s-demo-currency-provider.health.resources.yaml</code> already contains above modifications. So you can use <code class="highlighter-rouge">kubectl apply -f k8s/k8s-demo-currency-provider.health.resources.yaml</code> instead. Run <code class="highlighter-rouge">kubectl autoscale deployment k8s-demo-currency-provider --min=2 --max=5 --cpu-percent=80</code>. It enables HPA for our deployment with constraints for count of pods. Minimum is set to 2...</description>
<pubDate>Sun, 16 Jul 2017 01:48:05 +0200</pubDate>
<link>https://rebyrg.github.io/kubernetes-demo/4/</link>
<guid isPermaLink="true">https://rebyrg.github.io/kubernetes-demo/4/</guid>
<category>kubernetes</category>
<category>blog</category>
<category>java</category>
<category>kubernetes</category>
</item>
<item>
<title>Kubernetes demo</title>
<description><p>My notes made to demonstrate kubernetes features. The demo was in July 2017 for develelopers in company I work for. I did it for people who didn’t know what container and kubernetes are. I tried to encourage them to start their adventure with kubernets. Source code: <a href="https://github.com/Rebyrg/k8s-demo">https://github.com/Rebyrg/k8s-demo</a></p> <h1 id="application">Application</h1> <p>It is a very simple spring boot application created for demonstration of basic kubernetes features. It also shows basic principles of creating spring boot applications which are deployed on a kubernetes cluster.</p> <p>The application exposes only one simple service <code class="highlighter-rouge">/rate</code> on spring boot http port (default 8080). The rate...</description>
<pubDate>Sun, 16 Jul 2017 01:48:05 +0200</pubDate>
<link>https://rebyrg.github.io/kubernetes-demo/view-all/</link>
<guid isPermaLink="true">https://rebyrg.github.io/kubernetes-demo/view-all/</guid>
<category>kubernetes</category>
<category>blog</category>
<category>java</category>
<category>kubernetes</category>
</item>
</channel>
</rss>