Deploy GitHub Pages
This commit is contained in:
parent
b479f09b97
commit
a03213218f
58 changed files with 2308 additions and 376 deletions
|
|
@ -358,6 +358,18 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/baremetal/" title="Bare-metal considerations" class="md-nav__link">
|
||||
Bare-metal considerations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/rbac/" title="Role Based Access Control (RBAC)" class="md-nav__link">
|
||||
Role Based Access Control (RBAC)
|
||||
|
|
@ -1059,12 +1071,10 @@ It's important the file generated is named <code class="codehilite">auth</code>
|
|||
<span class="go">Adding password for user foo</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create secret generic basic-auth --from-file<span class="o">=</span>auth
|
||||
<span class="go">secret "basic-auth" created</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl get secret basic-auth -o yaml
|
||||
<span class="go">apiVersion: v1</span>
|
||||
<span class="go">data:</span>
|
||||
|
|
@ -1076,7 +1086,6 @@ It's important the file generated is named <code class="codehilite">auth</code>
|
|||
<span class="go">type: Opaque</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="codehilite"><pre><span></span><span class="go">echo "</span>
|
||||
<span class="go">apiVersion: extensions/v1beta1</span>
|
||||
<span class="go">kind: Ingress</span>
|
||||
|
|
@ -1101,7 +1110,6 @@ It's important the file generated is named <code class="codehilite">auth</code>
|
|||
<span class="go">" | kubectl create -f -</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="codehilite"><pre><span></span>$ curl -v http://10.2.29.4/ -H 'Host: foo.bar.com'
|
||||
* Trying 10.2.29.4...
|
||||
* Connected to 10.2.29.4 (10.2.29.4) port 80 (#0)
|
||||
|
|
@ -1128,7 +1136,6 @@ It's important the file generated is named <code class="codehilite">auth</code>
|
|||
* Connection #0 to host 10.2.29.4 left intact
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="codehilite"><pre><span></span>$ curl -v http://10.2.29.4/ -H <span class="s1">'Host: foo.bar.com'</span> -u <span class="s1">'foo:bar'</span>
|
||||
* Trying <span class="m">10</span>.2.29.4...
|
||||
* Connected to <span class="m">10</span>.2.29.4 <span class="o">(</span><span class="m">10</span>.2.29.4<span class="o">)</span> port <span class="m">80</span> <span class="o">(</span><span class="c1">#0)</span>
|
||||
|
|
|
|||
|
|
@ -358,6 +358,18 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/baremetal/" title="Bare-metal considerations" class="md-nav__link">
|
||||
Bare-metal considerations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/rbac/" title="Role Based Access Control (RBAC)" class="md-nav__link">
|
||||
Role Based Access Control (RBAC)
|
||||
|
|
|
|||
|
|
@ -358,6 +358,18 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/baremetal/" title="Bare-metal considerations" class="md-nav__link">
|
||||
Bare-metal considerations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/rbac/" title="Role Based Access Control (RBAC)" class="md-nav__link">
|
||||
Role Based Access Control (RBAC)
|
||||
|
|
@ -1133,7 +1145,6 @@ status:
|
|||
$
|
||||
</pre></div>
|
||||
|
||||
|
||||
<p>Test 1: no username/password (expect code 401)</p>
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> curl -k http://172.17.4.99 -v -H <span class="s1">'Host: external-auth-01.sample.com'</span>
|
||||
<span class="go">* Rebuilt URL to: http://172.17.4.99/</span>
|
||||
|
|
@ -1162,8 +1173,7 @@ $
|
|||
<span class="go">* Connection #0 to host 172.17.4.99 left intact</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<p>Test 2: valid username/password (expect code 200)</p>
|
||||
<p>Test 2: valid username/password (expect code 200)
|
||||
<div class="codehilite"><pre><span></span>$ curl -k http://172.17.4.99 -v -H <span class="s1">'Host: external-auth-01.sample.com'</span> -u <span class="s1">'user:passwd'</span>
|
||||
* Rebuilt URL to: http://172.17.4.99/
|
||||
* Trying <span class="m">172</span>.17.4.99...
|
||||
|
|
@ -1207,10 +1217,8 @@ x-real-ip<span class="o">=</span><span class="m">10</span>.2.60.1
|
|||
BODY:
|
||||
* Connection <span class="c1">#0 to host 172.17.4.99 left intact</span>
|
||||
-no body in request-
|
||||
</pre></div>
|
||||
|
||||
|
||||
<p>Test 3: invalid username/password (expect code 401)</p>
|
||||
</pre></div></p>
|
||||
<p>Test 3: invalid username/password (expect code 401)
|
||||
<div class="codehilite"><pre><span></span>curl -k http://172.17.4.99 -v -H 'Host: external-auth-01.sample.com' -u 'user:user'
|
||||
* Rebuilt URL to: http://172.17.4.99/
|
||||
* Trying 172.17.4.99...
|
||||
|
|
@ -1239,7 +1247,7 @@ BODY:
|
|||
<span class="nt"></body></span>
|
||||
<span class="nt"></html></span>
|
||||
* Connection #0 to host 172.17.4.99 left intact
|
||||
</pre></div>
|
||||
</pre></div></p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -358,6 +358,18 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/baremetal/" title="Bare-metal considerations" class="md-nav__link">
|
||||
Bare-metal considerations
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../deploy/rbac/" title="Role Based Access Control (RBAC)" class="md-nav__link">
|
||||
Role Based Access Control (RBAC)
|
||||
|
|
@ -1172,7 +1184,6 @@ same endpoint.</p>
|
|||
<span class="nn">...</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<h3 id="example-oauth2-proxy-kubernetes-dashboard">Example: OAuth2 Proxy + Kubernetes-Dashboard<a class="headerlink" href="#example-oauth2-proxy-kubernetes-dashboard" title="Permanent link">¶</a></h3>
|
||||
<p>This example will show you how to deploy <a href="https://github.com/bitly/oauth2_proxy"><code class="codehilite">oauth2_proxy</code></a>
|
||||
into a Kubernetes cluster and use it to protect the Kubernetes Dashboard using github as oAuth2 provider</p>
|
||||
|
|
@ -1183,7 +1194,6 @@ into a Kubernetes cluster and use it to protect the Kubernetes Dashboard using g
|
|||
<div class="codehilite"><pre><span></span><span class="go">kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.5.0.yaml</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<ol>
|
||||
<li>Create a <a href="https://github.com/settings/applications/new">custom Github OAuth application</a></li>
|
||||
</ol>
|
||||
|
|
@ -1215,7 +1225,6 @@ into a Kubernetes cluster and use it to protect the Kubernetes Dashboard using g
|
|||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f oauth2-proxy.yaml,dashboard-ingress.yaml
|
||||
</pre></div>
|
||||
|
||||
|
||||
<p>Test the oauth integration accessing the configured URL, like <code class="codehilite">https://foo.bar.com</code></p>
|
||||
<p><img alt="Register OAuth2 Application" src="../images/github-auth.png" /></p>
|
||||
<p><img alt="Github authentication" src="../images/oauth-login.png" /></p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue