avatarCraig Robinson

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

15079

Abstract

hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">port=6443/tcp</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">port=22623/tcp</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">service=http</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">service=https</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">reload</span></pre></div><h1 id="ca08">Install Apache/HTTPD</h1><div id="a808"><pre>sudo yum <span class="hljs-keyword">install</span> –y httpd</pre></div><p id="163f">Change httpd to listen port to 8080:</p><div id="0260"><pre>sudo <span class="hljs-keyword">vim</span> /etc/httpd/<span class="hljs-keyword">conf</span>/httpd.<span class="hljs-keyword">conf</span></pre></div><p id="0b53">Change “Listen 80” to “Listen 8080” around line 42:</p><figure id="9671"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*PgNWvdhWJht5givq8snX4w.png"><figcaption></figcaption></figure><p id="6e65">Enable and Start httpd service/Allow port 8080 on the firewall:</p><div id="600d"><pre>sudo setsebool -P httpd_read_user_content 1 sudo systemctl <span class="hljs-built_in">enable</span> httpd sudo systemctl start httpd sudo firewall-cmd --permanent <span class="hljs-attribute">--add-port</span>=8080/tcp sudo firewall-cmd –reload</pre></div><p id="320b">Test the webserver:</p><div id="7c39"><pre><span class="hljs-attribute">curl</span> localhost:<span class="hljs-number">8080</span></pre></div><figure id="c064"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*JsD5PGp8_IwW0npxJZoHwQ.png"><figcaption>A successful curl should look like this.</figcaption></figure><h1 id="b71e">pfSense Tweaks</h1><p id="9a1f">To access OKD on port 443 from your home network, we need to change the management port on the pfSense like so:</p><p id="dc24">Add 4433 to Firewall rule on PFSense; Firewall → Rules → WAN → Add</p><figure id="e123"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lmTNC-S4A0RPVgjncOSw7w.png"><figcaption></figcaption></figure><p id="a047">Change PFSense default port to 4433; System → Advanced → TCP Port Change to 4433</p><figure id="a5ad"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Zgnp3-Zr4QmjB1dr-vfEYw.png"><figcaption></figcaption></figure><p id="c2da">Add 6443, 80, 443 port-forward rules to okd4-services for access from your home network.</p><figure id="6fbb"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*xn04LH8p_gfseAAxl3kuvA.png"><figcaption></figcaption></figure><h1 id="10f5">Congratulations, You Are Half Way There!</h1><p id="f582">Congrats! You should now have a separate home lab environment setup and ready for ODK. Now we can start the install.</p><h1 id="5a58">Download the openshift-installer and oc client:</h1><p id="00d5">SSH to the okd4-services VM</p><p id="b2c5">To download the latest oc client and openshift-install binaries, you need to use an existing version of the oc client.</p><p id="9438">Download the 4.4 version of the oc client and openshift-install from the <a href="https://github.com/openshift/okd/releases">OKD releases page</a>. Example:</p><div id="cd0b"><pre><span class="hljs-attribute">wget</span> https://github.com/openshift/okd/releases/download/<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5/openshift-client-linux-<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5.tar.gz</pre></div><div id="b3c2"><pre><span class="hljs-attribute">wget</span> https://github.com/openshift/okd/releases/download/<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5/openshift-install-linux-<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5.tar.gz</pre></div><p id="350b">Extract the okd version of the oc client and openshift-install:</p><div id="badb"><pre><span class="hljs-attribute">tar</span> -zxvf openshift-client-linux-<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5.tar.gz</pre></div><div id="7110"><pre><span class="hljs-attribute">tar</span> -zxvf openshift-install-linux-<span class="hljs-number">4</span>.<span class="hljs-number">4</span>.<span class="hljs-number">0</span>-<span class="hljs-number">0</span>.okd-<span class="hljs-number">2020</span>-<span class="hljs-number">05</span>-<span class="hljs-number">23</span>-<span class="hljs-number">055148</span>-beta5.tar.gz</pre></div><p id="d008">Move the kubectl, oc, and openshift-install to /usr/local/bin and show the version:</p><div id="3c93"><pre>sudo mv kubectl oc openshift-install /usr/<span class="hljs-keyword">local</span>/bin/ oc <span class="hljs-built_in">version</span> openshift-install <span class="hljs-built_in">version</span></pre></div><p id="9a01">The latest and recent releases are available at <a href="https://origin-release.svc.ci.openshift.org/">https://origin-release.svc.ci.openshift.org</a></p><h1 id="3df1">Setup the openshift-installer:</h1><p id="9890">In the install-config.yaml, you can either use a pull-secret from RedHat or apply a bypass fix. For the bypass use “{“auths”:{“fake”:{“auth”: “bar”}}}” as the pull-secret.</p><p id="773c">Generate an SSH key if you do not already have one.</p><p id="a189">Create an install directory and copy the install-config.yaml file:</p><div id="a08a"><pre><span class="hljs-built_in">cd</span> ~ <span class="hljs-built_in">mkdir</span> install_dir <span class="hljs-built_in">cp</span> okd4_files/install-config.yaml ./install_dir</pre></div><p id="81c1">Edit the install-config.yaml in the install_dir, insert your pull secret and ssh key, and backup the install-config.yaml as it will be deleted in the next step:</p><div id="4da7"><pre>sudo vim ./install_dir/install-config.yaml</pre></div><div id="6c0a"><pre><span class="hljs-built_in">cp</span> ./install_dir/install-config.yaml ./install_dir/install-config.yaml.bak</pre></div><p id="d952">Generate the Kubernetes manifests for the cluster, ignore the warning:</p><div id="093f"><pre>openshift-install <span class="hljs-built_in">create</span> manifests <span class="hljs-comment">--dir=install_dir/</span></pre></div><p id="6f88">Modify the cluster-scheduler-02-config.yaml manifest file to prevent Pods from being scheduled on the control plane machines:</p><div id="4696"><pre><span class="hljs-attribute">vim</span> install_dir/manifests/cluster-scheduler-<span class="hljs-number">02</span>-config.yml</pre></div><p id="98e7">Locate the mastersSchedulable parameter and change the value to False :</p><figure id="1cbd"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*5-L_H4pPvuA1wQbIqegofA.png"><figcaption></figcaption></figure><p id="5200">Now you can create the ignition-configs:</p><div id="3742"><pre>openshift-install <span class="hljs-built_in">create</span> ignition-configs <span class="hljs-comment">--dir=install_dir/</span></pre></div><p id="73e6"><b>Note:</b> If you reuse the install_dir, make sure it is empty. Hidden files are created after generating the configs, and they should be removed before you use the same folder on a 2nd attempt.</p><h1 id="3f7d">Host ignition and Fedora CoreOS files on the webserver:</h1><p id="a067">Create okd4 directory in /var/www/html:</p><div id="fad2"><pre>sudo mkdir <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span>okd4</pre></div><p id="3cb6">Copy the install_dir contents to /var/www/html/okd4 and set permissions:</p><div id="712f"><pre>sudo cp -R install_dir<span class="hljs-regexp">/* /</span>var<span class="hljs-regexp">/www/</span>html<span class="hljs-regexp">/okd4/</span> sudo chown -R apache: <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span> sudo chmod -R <span class="hljs-number">755</span> <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span></pre></div><p id="9d41">Test the webserver:</p><div id="ca2b"><pre>curl localhost:8080/okd4/metadata.json</pre></div><p id="b058">Download the<a href="https://getfedora.org/coreos/download/"> Fedora CoreOS</a> bare-metal bios image and sig files and shorten the file names:</p><div id="8326"><pre>cd <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span>okd4/</pre></div><div id="c5ab"><pre><span class="hljs-attribute">sudo</span> wget https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/<span class="hljs-number">31</span>.<span class="hljs-number">20200505</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>/x86_64/fedora-coreos-<span class="hljs-number">31</span>.<span class="hljs-number">20200505</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>-metal.x86_64.raw.xz</pre></div><div id="6c7a"><pre><span class="hljs-attribute">sudo</span> wget https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/<span class="hljs-number">31</span>.<span class="hljs-number">20200505</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>/x86_64/fedora-coreos-<span class="hljs-number">31</span>.<span class="hljs-number">20200505</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>-metal.x86_64.raw.xz.sig</pre></div><div id="d2d4"><pre><span class="hljs-attribute">sudo</span> mv fedora-coreos-<span class="hljs-number">31</span>.<span class="hljs-number">20200505</span>.<span class="hljs-number">3</span>.<span class="hljs-number">0</span>-metal.x86_64.raw.xz fcos.raw.xz</pre></div><div id="3e8b"><pre>sudo mv fedora-coreos-<span class="hljs-number">31.20200505</span>.<span class="hljs-number">3.0</span>-metal<span class="hljs-selector-class">.x86_64</span><span class="hljs-selector-class">.raw</span><span class="hljs-selector-class">.xz</span><span class="hljs-selector-class">.sig</span> fcos<span class="hljs-selector-class">.raw</span><span class="hljs-selector-class">.xz</span>.sig</pre></div><div id="66a9"><pre>sudo chown -R apache: <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span> sudo chmod -R <span class="hljs-number">755</span> <span class="hljs-regexp">/var/</span>www<span class="hljs-regexp">/html/</span></pre></div><h1 id="c63e">Starting the bootstrap node:</h1><p id="9328">Power on odk4-bootstrap VM. Press the TAB key to edit the kernel boot options and add the following:</p><div id="28e1"><pre><span class="hljs-attr">coreos.inst.install_dev</span>=/dev/sda</pre></div><div id="d798"><pre>coreos.inst.image_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/</span>fcos.raw.xz</pre></div><div id="b47d"><pre>coreos.inst.ignition_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/</span>bootstrap.ign</pre></div><figure id="6cff"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3Ha4SENa1kWoMVwPN3O4oQ.png"><figcaption></figcaption></figure><p id="8695">You should see that the fcos.raw.gz image and signature have been downloaded:</p><figure id="3c8e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*73NqTIz7nk4bROXiVU83bg.png"><figcaption></figcaption></figure><p id="60c8">After installation of the image, the VM restarts to the login screen and begins to show the following (do not panic, this is normal):</p><figure id="8272"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*NzDxWDHzueqzgdzbBqMoRw.png"><figcaption></figcaption></figure><p id="3f69">The console window shows many messages during the install and restarts several times. It’s time to start the control plane and compute nodes.</p><h1 id="0a6d">Starting the control plane nodes:</h1><p id="ff33">When powering on the control nodes press TAB to edit like before and use the following values (note the master.ign at the end):</p><div id="d8ad"><pre><span class="hljs-attr">coreos.inst.install_dev</span>=/dev/sda</pre></div><div id="0586"><pre>coreos.inst.image_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/</span>fcos.raw.xz</pre></div><div id="6dd8"><pre>coreos.inst.ignition_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/m</span>aster.ign</pre></div><figure id="2f58"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*5LFjblJxABv8u2peXj9IbA.png"><figcaption></figcaption></figure><p id="f719

Options

">Just like the bootstrap node, you should see that the fcos.raw.gz image and signature have been downloaded:</p><figure id="56dc"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*N1CXRFntT4uJvfXjmJZY-A.png"><figcaption></figcaption></figure><p id="2b50">After installing the image is installed, the VM restarts to the login screen, begin to update ostree, and then reboot once completed just like the bootstrap node:</p><figure id="6bf2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*NzDxWDHzueqzgdzbBqMoRw.png"><figcaption></figcaption></figure><p id="dec8">Now repeat the same process for the other two control nodes and compute nodes.</p><h1 id="f30d">Starting the compute nodes:</h1><p id="dd1a">When powering on the compute nodes press TAB to edit like before and use the following values (note the worker.ign at the end):</p><div id="12e2"><pre><span class="hljs-attr">coreos.inst.install_dev</span>=/dev/sda</pre></div><div id="0f5d"><pre>coreos.inst.image_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/</span>fcos.raw.xz</pre></div><div id="dc98"><pre>coreos.inst.ignition_url=http:<span class="hljs-regexp">//</span><span class="hljs-number">192.168</span>.<span class="hljs-number">1.210</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/okd4/</span>worker.ign</pre></div><figure id="acc1"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*w-WojGRnD9r8XzuWN7uCjw.png"><figcaption></figcaption></figure><p id="3754">Just like the other nodes, you should see that the fcos.raw.gz image and signature have been downloaded:</p><figure id="3bbd"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*N1CXRFntT4uJvfXjmJZY-A.png"><figcaption></figcaption></figure><p id="e8a4">After installing the image, the VM restarts to the login screen, begin to update ostree, and then reboot once completed just like the other nodes:</p><figure id="5897"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*NzDxWDHzueqzgdzbBqMoRw.png"><figcaption></figcaption></figure><p id="cdc1">Now repeat the same process for the other worker node.</p><h1 id="b1bd">Monitor the bootstrap installation:</h1><p id="8cd9">You can monitor the bootstrap process from the okd4-services node:</p><div id="d1fa"><pre>openshift-<span class="hljs-keyword">install </span>--<span class="hljs-keyword">dir=install_dir/ </span><span class="hljs-keyword">wait-for </span><span class="hljs-keyword">bootstrap-complete </span>--log-level=info</pre></div><figure id="b9f4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Pi1ivaHs1EJao8EM6CYnqw.jpeg"><figcaption></figcaption></figure><p id="d408"><b>Note: </b>At this point, in the image above, you can shutdown your bootstrap node. Now is a good time to edit the /etc/haproxy/haproxy.cfg, comment out the bootstrap node, and restart the haproxy service.</p><div id="481a"><pre>sudo vi <span class="hljs-regexp">/etc/</span>haproxy/haproxy.cfg sudo systemctl restart haproxy</pre></div><h1 id="290a">Login to the cluster and approve CSRs:</h1><p id="0199">Now that the masters are online, you should be able to login with the oc client. Use the following commands to log in and check the status of your cluster:</p><div id="1270"><pre><span class="hljs-built_in">export</span> <span class="hljs-attribute">KUBECONFIG</span>=/install_dir/auth/kubeconfig oc whoami oc <span class="hljs-built_in">get</span> nodes oc <span class="hljs-built_in">get</span> csr</pre></div><figure id="a0d0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*geQQvbmQwJwahNvPaJ-iQg.png"><figcaption></figcaption></figure><p id="e7d6">You should only see the master nodes and several CSR’s waiting for approval. Install the jq package to assist with approving multiple CSR’s at once time.</p><div id="a17d"><pre>wget -O jq https:<span class="hljs-regexp">//gi</span>thub.com<span class="hljs-regexp">/stedolan/</span>jq<span class="hljs-regexp">/releases/</span>download<span class="hljs-regexp">/jq-1.6/</span>jq-linux64</pre></div><div id="1f1f"><pre><span class="hljs-built_in">chmod</span> +x jq sudo <span class="hljs-built_in">mv</span> jq /usr/local/bin/ jq --version</pre></div><figure id="17bc"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*NeRWk3TPL-nm7yr26R2KtQ.png"><figcaption></figcaption></figure><p id="4249">Approve all the pending certs and check your nodes:</p><div id="4148"><pre>oc get csr -ojson | <span class="hljs-type">jq</span> -r '.items[] | <span class="hljs-type">select</span>(.status == {} ) | <span class="hljs-type">.metadata</span>.name' | <span class="hljs-type">xargs</span> oc adm certificate approve</pre></div><figure id="798f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_nEAYNNlR-lo_qwwBclyvA.png"><figcaption></figcaption></figure><p id="6f71">Log in to the web console using your workstation. Before you do, add console-openshift-console.apps.lab.okd.local to your workstation’s hosts file :</p><div id="0779"><pre><workstation ip addr> console-openshift-console<span class="hljs-selector-class">.apps</span><span class="hljs-selector-class">.lab</span><span class="hljs-selector-class">.okd</span>.local</pre></div><p id="0aa9">Also, get your kubeadmin password from the install_dir/auth folder and login to the web console:</p><div id="4912"><pre><span class="hljs-built_in">cat</span> install_dir/auth/kubeadmin-password</pre></div><figure id="eddd"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*DMJ6Duxj2y2yHkM7f-sydw.png"><figcaption></figcaption></figure><figure id="5736"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*PJgnuTw6P8rRoACzBJnNig.png"><figcaption></figcaption></figure><p id="7a08">The only items remaining are the operators, persistent storage, and configuration of the registry.</p><h1 id="b752">Checking Cluster Operators:</h1><p id="48b5">Even though the GUI is up, some operators may still be in the process of coming online. To see a list of those operators and the respective status use the following command:</p><div id="9910"><pre>oc <span class="hljs-built_in">get</span> clusteroperators</pre></div><figure id="352b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*JiAFCuqCG6xlH92wRwcc8w.png"><figcaption></figcaption></figure><h1 id="7835">Persistent Storage:</h1><p id="6874">We need to create some persistent storage for our registry before we can complete this project. Let’s configure our okd4-services VM as an NFS server and use it for persistent storage.</p><p id="7b86">Login to your okd4-services VM and begin to set up an NFS server. The following commands install the necessary packages, enable services, and configure file and folder permissions.</p><div id="7e26"><pre>sudo yum install –y nfs-utils sudo systemctl <span class="hljs-built_in">enable</span> nfs-server rpcbind sudo systemctl start nfs-server rpcbind nfs-lock-nfs-idmap sudo <span class="hljs-built_in">mkdir</span> –p /var/nfsshare/registry sudo <span class="hljs-built_in">chmod</span> –R 777 /var/nfsshare sudo <span class="hljs-built_in">chown</span> –R nfsnobody:nfsnobody /var/nfsshare</pre></div><p id="2a52">Create an NFS Export</p><div id="0303"><pre>sudo vi <span class="hljs-regexp">/etc/</span>exports</pre></div><p id="aae7">Add this line in the new /etc/exports file “/var/nfsshare 192.168.1.0/24(rw,sync,no_root_squash,no_all_squash,no_wdelay)”</p><figure id="bcee"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*S4xYsBQtmZIkNN6_A8RHHA.png"><figcaption></figcaption></figure><p id="b8aa">Restart the nfs-server service and add firewall rules:</p><div id="83df"><pre><span class="hljs-comment">sudo setsebool</span> <span class="hljs-literal">-</span><span class="hljs-comment">P nfs_export_all_rw 1</span> <span class="hljs-comment">sudo systemctl restart nfs</span><span class="hljs-literal">-</span><span class="hljs-comment">server</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">zone=public</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">service mountd</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">zone=public</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">service rpc</span><span class="hljs-literal">-</span><span class="hljs-comment">bind</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">permanent</span> <span class="hljs-literal">--</span><span class="hljs-comment">zone=public</span> <span class="hljs-literal">--</span><span class="hljs-comment">add</span><span class="hljs-literal">-</span><span class="hljs-comment">service nfs</span> <span class="hljs-comment">sudo firewall</span><span class="hljs-literal">-</span><span class="hljs-comment">cmd</span> <span class="hljs-literal">--</span><span class="hljs-comment">reload</span></pre></div><h1 id="d419">Registry configuration:</h1><p id="1fb2">Create a persistent volume on the NFS share. Use the registry_py.yaml in okd4_files folder from the git repo:</p><div id="5e8c"><pre>oc <span class="hljs-built_in">create</span> -f okd4_files/registry_pv.yaml oc <span class="hljs-built_in">get</span> pv</pre></div><figure id="ee06"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Mgz6tqyQ8UYX3MUajb6Ixw.png"><figcaption></figcaption></figure><p id="563b">Edit the image-registry operator:</p><div id="8f31"><pre>oc edit configs<span class="hljs-selector-class">.imageregistry</span><span class="hljs-selector-class">.operator</span><span class="hljs-selector-class">.openshift</span>.io</pre></div><p id="52fe">Change the managmentState: from Removed to Managed. Under storage: add the pvc: and claim: blank to attach the PV and save your changes automatically:</p><div id="e174"><pre><span class="hljs-symbol">managementStage:</span> Managed</pre></div><div id="6b8f"><pre><span class="hljs-symbol">storage:</span> <span class="hljs-symbol"> pvc:</span> <span class="hljs-symbol"> claim:</span></pre></div><figure id="9319"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3bvLvkukjzezEn3sC9gGkQ.png"><figcaption></figcaption></figure><p id="f1fe">Check your persistent volume, and it should now be claimed:</p><div id="8746"><pre>oc <span class="hljs-built_in">get</span> <span class="hljs-built_in">pv</span></pre></div><figure id="2378"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Tm3PdPKSBACJx_iZtGu8NA.png"><figcaption></figcaption></figure><p id="4910">To test the registry and underlying storage, create a new php project in OKD and use the example repository. Check your NFS export on okd4-services for data:</p><figure id="4a69"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*tlTGiPPAT4GQByYbYbkTiQ.png"><figcaption></figcaption></figure><h1 id="d070">Create Wordpress Project:</h1><p id="6b3c">Create a new project.</p><div id="37c5"><pre>oc<span class="hljs-built_in"> new-project </span>wordpress-test</pre></div><p id="ae3c">Create a new app using the centos php73 s2i image from dockerhub and use the WordPress GitHub repo for the source. Also expose the service to create a route.</p><div id="1685"><pre>oc<span class="hljs-built_in"> new-app </span>centos/php-73-centos7https://github.com/WordPress/WordPress.git</pre></div><div id="0793"><pre>oc expose svc/wordpress</pre></div><p id="670b">Create a new app using the centos7 mariadb image.</p><div id="a28b"><pre>oc<span class="hljs-built_in"> new-app </span>centos/mariadb-103-centos7 --name mariadb --env MYSQL_DATABASE=wordpress --env MYSQL_USER=wordpress --env MYSQL_PASSWORD=wordpress</pre></div><p id="f8d7">Open the route url and setup WordPress using mariadb (the service name) as the database host.</p><h1 id="5046">HTPasswd Setup:</h1><figure id="2626"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*7f4BzspALWOk0AmR_uONgQ.png"><figcaption></figcaption></figure><p id="cee9">The kubeadmin is a temporary user. The easiest way to set up a local user is with htpasswd.</p><div id="b616"><pre>htpasswd -c -B -b <span class="hljs-attribute"></path/to/users.htpasswd></span> <span class="hljs-attribute"><user_name></span> <span class="hljs-attribute"><password></span></pre></div><p id="346e">Create a secret in the openshift-config project using the users.htpasswd file you generated:</p><div id="8d2d"><pre>oc create<span class="hljs-built_in"> secret </span>generic htpass-secret <span class="hljs-attribute">--from-file</span>=htpasswd=users.htpasswd -n openshift-config</pre></div><p id="c2e7">Add the identity provider.</p><div id="c040"><pre>oc apply -f okd4_files/htpasswd_provider.yaml</pre></div><p id="9159">Login with my_htpasswd_provider using the username and password you created:</p><figure id="f155"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*DZDyt3fonpfruQQaA0OeNQ.png"><figcaption></figcaption></figure><p id="e173">Bind the cluster-admin role to your user:</p><div id="d877"><pre>oc adm policy<span class="hljs-built_in"> add-cluster-role-to-user </span>cluster-admin <username></pre></div><p id="db38">Your user should now have cluster-admin level access:</p><figure id="14f4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*q4GjEBHnzYkJV9tolzhFyg.png"><figcaption></figcaption></figure><p id="85f7">To report issues, use the <a href="https://github.com/openshift/okd">OKD Github Repo:</a> <a href="https://github.com/openshift/okd">https://github.com/openshift/okd</a></p><p id="8a08">For support check out the #openshift-users channel on <a href="https://slack.k8s.io/">k8s Slack</a></p><p id="442e">The <a href="https://github.com/openshift/community#okd-working-group-meetings">OKD Working Group</a> meets bi-weekly to discuss the development and next steps. The meeting schedule and location are tracked in the <a href="https://github.com/openshift/community/projects/1#card-28309038">openshift/community repo</a>.</p><p id="18c8">Google group for okd-wg: <a href="https://groups.google.com/forum/#!forum/okd-wg">https://groups.google.com/forum/#!forum/okd-wg</a></p><p id="623c">This guide should get you up and started in the right direction. Good luck on your journey with OpenShift!</p></article></body>

OKD 4.4Bare Metal Install on VMWare Home Lab

Updated: 5/26/2020

This guide is deprecated. Please use the new guide for OKD 4.5 at https://readmedium.com/guide-installing-an-okd-4-5-cluster-508a2631cbee

OKD is the upstream and community-supported version of the Red Hat OpenShift Container Platform (OCP). OpenShift expands vanilla Kubernetes into an application platform designed for enterprise use at scale. Starting with the release of OpenShift 4, the default operating system is Red Hat CoreOS, which provides an immutable infrastructure and automated updates. Fedora CoreOS, like OKD, is the upstream version of Red Hat CoreOS.

For those of you who have a Home Lab, you can gain some experience with OpenShift by using the open-source upstream combination of OKD and FCOS (Fedora CoreOS) to build your own cluster.

Experience is an excellent way to learn new technologies. Used hardware for a home lab that could run an OKD cluster is relatively inexpensive these days ($250–$350), especially when compared to a cloud-hosted solution costing over $250 per month.

The purpose of this guide is to help you successfully build an OKD 4.4 cluster at home that you can take for a test drive. VMWare is the example hypervisor used in this guide, but you could use Hyper-V, libvirt, VirtualBox, bare metal, or other platforms.

This guide assumes you have a virtualization platform, basic knowledge of Linux, and the ability to Google.

Note: In this tutorial, I use a 192.168.1.0/24 network for OKD. If you already use 192.168.1.0/24 be sure to use a different IP scheme for your OKD environment. An alternate network would be 192.168.100.0/24 for example.

VM Overview:

For my installation, I used an ESXi 6.5 host with 96GB of RAM and a separate VLAN configured for OKD. Here is a breakdown of the virtual machines:

Note: “There are terraform scripts available to setup vSphere-enabled kubelet” -/r/roignac. I chose not to use the scripts as it added an extra layer of complexity, but they are available.

Create a new network in VMWare for OKD:

Login to your VMWare Host. Select Networking → Port Groups → Add port group. Setup an OKD network on an unused VLAN, in my instance, VLAN 20.

Name your Group and set your VLAN ID.

Create a pfSense VM:

Download the pfSense ISO and upload it to your ESXi host’s datastore.

Create a new Virtual Machine. Choose Guest OS as Other and Select FreeBSD 64-bit.

Use the default template settings for resources. I prefer to thin provision my disks for non-production use.

Select your home network for Network Adapter 1, and add a new network adapter using the OKD network.

Setup pfSense:

Power on your pfSense VM and run through the installation using all the default values. After completion your VM console should look like this:

pfSense Console

Using the VMWare console on the pfSense VM, select option 8 to access the shell. Add a firewall rule by typing “ easyrule pass wan tcp any any 443”. Next, type “pfctl –d” to turn off the packet filter temporarily. This rule allows you to access the pfSense web GUI from your workstation.

Source: https://docs.j7k6.org/pfsense-wan-webinterface/

Login to pfSense via your web-browser. The default username is “admin” and the password is “pfsense”.

After logging in, click next and use “okd4-pfsense” for hostname and “okd.local” for the domain. Also, enable DNS Server Override and Disable DNS Forwarder. Next.

Select your Timezone. Next.

Use Defaults for WAN Configuration. Uncheck “Block RFC1918 Private Networks” since your home network is the “WAN” in this setup. Next.

Create bootstrap, master, and worker nodes:

Download the Fedora CoreOS Bare Metal ISO and upload it to your ESXi datastore.

The latest stable version at the time of writing is 31.20200505.3.0

Create the six ODK nodes (bootstrap, master, worker) on your ESXi host using the values in the spreadsheet:

Note: I had to increase my compute nodes to 4 vCPU to deploy some image-pruner pods. YMMV.

You should end up with the following VMs:

Setup DHCP reservations:

Compile a list of the OKD nodes MAC addresses by viewing the hardware configuration of your VMs.

Login into pfSense. Go to Services → DHCP Server and change your ending range IP to 192.168.1.99, then click Save.

On the DHCP Server, page click Add at the bottom.

Fill in the MAC Address, IP Address, and Hostname, then click save. Do this for each ODK VM. Click Apply Changes at the top of the page when complete.

Create and set up VM to host various services:

The okd4-services VM is used to provide DNS, NFS exports, web server, and load balancing.

Download CentOS 7 minimal ISO (no GUI) and upload it to your ESXi datastore. Example: CentOS-7-x86_64-Minimal-1908.iso

*Note* Other users have reported issues with CentOS 8, I recommend using CentOS 7.

Create your okd4-services virtual machine. The 20GB drive is for the OS. The 100GB drive is for NFS and persistent storage for the OpenShift registry.

After creating the VM, copy the MAC address on the VM Hardware configuration page and set up a DHCP Reservation for this VM using the IP address 192.168.1.210. Hit “Apply Changes” at the top of the DHCP page when completed.

Power on the okd4-services VM.

Run through a typical CentOS 7 install, use the 20GB drive to install the OS. On the networking page, it should pull the 192.168.1.210 IP address from DHCP. Set a root password and an admin user.

While CentOS is installing, go to the pfSense GUI and setup a port forward to the okd4-services for remote ssh/scp access. This rule allows you to ssh from your workstation to copy and paste bash commands easily. Go to Firewall → NAT → Port Forward → Add

Destination port range “22” to “22”; redirect target IP “192.168.1.210”; redirect target port “22”

Click Save, then Apply Changes.

Reboot the okd4-services VM after installation and ssh to the WAN IP of your pfSense VM that you port forwarded to the okd4-services server.

ssh user@pfsense_ip

Install open-vm-tools, vim, wget, and git packages. Also, yum update the OS and reboot after completion.

sudo yum install –y open-vm-tools vim wget git && sudo yum updatey && sudo init 6

After updated and a restart. Use git to download the DNS, HAProxy, and install-conf.yaml example files via git:

git clone https://github.com/cragr/okd4_files.git
cd okd4_files

Install bind (DNS)

sudo yum -y install bind bind-utils

Copy the named config files and zones:

sudo cp named.conf /etc/named.conf
sudo cp named.conf.local /etc/named/
sudo mkdir /etc/named/zones
sudo cp db* /etc/named/zones

Enable and start named:

sudo systemctl enable named
sudo systemctl start named
sudo systemctl status named

Create firewall rules:

sudo firewall-cmd --permanent --add-port=53/udp
sudo firewall-cmd --reload

Set the DNS server IP to 192.168.1.210 in the pfSense DHCP server settings. Services → DHCP → Servers

Restart the network services on the okd4-services VM:

sudo systemctl restart network.service

Test DNS on the okd4-services

dig okd.local
dig –x 192.168.1.210

Install HAProxy:

sudo yum install haproxy

Copy haproxy config from the git okd4_files directory :

sudo cp haproxy.cfg /etc/haproxy/haproxy.cfg

Start, enable, and verify HA Proxy service:

sudo setsebool -P haproxy_connect_any 1
sudo systemctl enable haproxy
sudo systemctl start haproxy
sudo systemctl status haproxy

Add OKD firewall ports:

sudo firewall-cmd --permanent --add-port=6443/tcp
sudo firewall-cmd --permanent --add-port=22623/tcp
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

Install Apache/HTTPD

sudo yum install –y httpd

Change httpd to listen port to 8080:

sudo vim /etc/httpd/conf/httpd.conf

Change “Listen 80” to “Listen 8080” around line 42:

Enable and Start httpd service/Allow port 8080 on the firewall:

sudo setsebool -P httpd_read_user_content 1
sudo systemctl enable httpd
sudo systemctl start httpd
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd –reload

Test the webserver:

curl localhost:8080
A successful curl should look like this.

pfSense Tweaks

To access OKD on port 443 from your home network, we need to change the management port on the pfSense like so:

Add 4433 to Firewall rule on PFSense; Firewall → Rules → WAN → Add

Change PFSense default port to 4433; System → Advanced → TCP Port Change to 4433

Add 6443, 80, 443 port-forward rules to okd4-services for access from your home network.

Congratulations, You Are Half Way There!

Congrats! You should now have a separate home lab environment setup and ready for ODK. Now we can start the install.

Download the openshift-installer and oc client:

SSH to the okd4-services VM

To download the latest oc client and openshift-install binaries, you need to use an existing version of the oc client.

Download the 4.4 version of the oc client and openshift-install from the OKD releases page. Example:

wget https://github.com/openshift/okd/releases/download/4.4.0-0.okd-2020-05-23-055148-beta5/openshift-client-linux-4.4.0-0.okd-2020-05-23-055148-beta5.tar.gz
wget https://github.com/openshift/okd/releases/download/4.4.0-0.okd-2020-05-23-055148-beta5/openshift-install-linux-4.4.0-0.okd-2020-05-23-055148-beta5.tar.gz

Extract the okd version of the oc client and openshift-install:

tar -zxvf openshift-client-linux-4.4.0-0.okd-2020-05-23-055148-beta5.tar.gz
tar -zxvf openshift-install-linux-4.4.0-0.okd-2020-05-23-055148-beta5.tar.gz

Move the kubectl, oc, and openshift-install to /usr/local/bin and show the version:

sudo mv kubectl oc openshift-install /usr/local/bin/
oc version
openshift-install version

The latest and recent releases are available at https://origin-release.svc.ci.openshift.org

Setup the openshift-installer:

In the install-config.yaml, you can either use a pull-secret from RedHat or apply a bypass fix. For the bypass use “{“auths”:{“fake”:{“auth”: “bar”}}}” as the pull-secret.

Generate an SSH key if you do not already have one.

Create an install directory and copy the install-config.yaml file:

cd ~
mkdir install_dir
cp okd4_files/install-config.yaml ./install_dir

Edit the install-config.yaml in the install_dir, insert your pull secret and ssh key, and backup the install-config.yaml as it will be deleted in the next step:

sudo vim ./install_dir/install-config.yaml
cp ./install_dir/install-config.yaml ./install_dir/install-config.yaml.bak

Generate the Kubernetes manifests for the cluster, ignore the warning:

openshift-install create manifests --dir=install_dir/

Modify the cluster-scheduler-02-config.yaml manifest file to prevent Pods from being scheduled on the control plane machines:

vim install_dir/manifests/cluster-scheduler-02-config.yml

Locate the mastersSchedulable parameter and change the value to False :

Now you can create the ignition-configs:

openshift-install create ignition-configs --dir=install_dir/

Note: If you reuse the install_dir, make sure it is empty. Hidden files are created after generating the configs, and they should be removed before you use the same folder on a 2nd attempt.

Host ignition and Fedora CoreOS files on the webserver:

Create okd4 directory in /var/www/html:

sudo mkdir /var/www/html/okd4

Copy the install_dir contents to /var/www/html/okd4 and set permissions:

sudo cp -R install_dir/* /var/www/html/okd4/
sudo chown -R apache: /var/www/html/
sudo chmod -R 755 /var/www/html/

Test the webserver:

curl localhost:8080/okd4/metadata.json

Download the Fedora CoreOS bare-metal bios image and sig files and shorten the file names:

cd /var/www/html/okd4/
sudo wget https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200505.3.0/x86_64/fedora-coreos-31.20200505.3.0-metal.x86_64.raw.xz
sudo wget https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200505.3.0/x86_64/fedora-coreos-31.20200505.3.0-metal.x86_64.raw.xz.sig
sudo mv fedora-coreos-31.20200505.3.0-metal.x86_64.raw.xz fcos.raw.xz
sudo mv fedora-coreos-31.20200505.3.0-metal.x86_64.raw.xz.sig fcos.raw.xz.sig
sudo chown -R apache: /var/www/html/
sudo chmod -R 755 /var/www/html/

Starting the bootstrap node:

Power on odk4-bootstrap VM. Press the TAB key to edit the kernel boot options and add the following:

coreos.inst.install_dev=/dev/sda
coreos.inst.image_url=http://192.168.1.210:8080/okd4/fcos.raw.xz
coreos.inst.ignition_url=http://192.168.1.210:8080/okd4/bootstrap.ign

You should see that the fcos.raw.gz image and signature have been downloaded:

After installation of the image, the VM restarts to the login screen and begins to show the following (do not panic, this is normal):

The console window shows many messages during the install and restarts several times. It’s time to start the control plane and compute nodes.

Starting the control plane nodes:

When powering on the control nodes press TAB to edit like before and use the following values (note the master.ign at the end):

coreos.inst.install_dev=/dev/sda
coreos.inst.image_url=http://192.168.1.210:8080/okd4/fcos.raw.xz
coreos.inst.ignition_url=http://192.168.1.210:8080/okd4/master.ign

Just like the bootstrap node, you should see that the fcos.raw.gz image and signature have been downloaded:

After installing the image is installed, the VM restarts to the login screen, begin to update ostree, and then reboot once completed just like the bootstrap node:

Now repeat the same process for the other two control nodes and compute nodes.

Starting the compute nodes:

When powering on the compute nodes press TAB to edit like before and use the following values (note the worker.ign at the end):

coreos.inst.install_dev=/dev/sda
coreos.inst.image_url=http://192.168.1.210:8080/okd4/fcos.raw.xz
coreos.inst.ignition_url=http://192.168.1.210:8080/okd4/worker.ign

Just like the other nodes, you should see that the fcos.raw.gz image and signature have been downloaded:

After installing the image, the VM restarts to the login screen, begin to update ostree, and then reboot once completed just like the other nodes:

Now repeat the same process for the other worker node.

Monitor the bootstrap installation:

You can monitor the bootstrap process from the okd4-services node:

openshift-install --dir=install_dir/ wait-for bootstrap-complete --log-level=info

Note: At this point, in the image above, you can shutdown your bootstrap node. Now is a good time to edit the /etc/haproxy/haproxy.cfg, comment out the bootstrap node, and restart the haproxy service.

sudo vi /etc/haproxy/haproxy.cfg
sudo systemctl restart haproxy

Login to the cluster and approve CSRs:

Now that the masters are online, you should be able to login with the oc client. Use the following commands to log in and check the status of your cluster:

export KUBECONFIG=~/install_dir/auth/kubeconfig
oc whoami
oc get nodes
oc get csr

You should only see the master nodes and several CSR’s waiting for approval. Install the jq package to assist with approving multiple CSR’s at once time.

wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x jq
sudo mv jq /usr/local/bin/
jq --version

Approve all the pending certs and check your nodes:

oc get csr -ojson | jq -r '.items[] | select(.status == {} ) | .metadata.name' | xargs oc adm certificate approve

Log in to the web console using your workstation. Before you do, add console-openshift-console.apps.lab.okd.local to your workstation’s hosts file :

<workstation ip addr> console-openshift-console.apps.lab.okd.local

Also, get your kubeadmin password from the install_dir/auth folder and login to the web console:

cat install_dir/auth/kubeadmin-password

The only items remaining are the operators, persistent storage, and configuration of the registry.

Checking Cluster Operators:

Even though the GUI is up, some operators may still be in the process of coming online. To see a list of those operators and the respective status use the following command:

oc get clusteroperators

Persistent Storage:

We need to create some persistent storage for our registry before we can complete this project. Let’s configure our okd4-services VM as an NFS server and use it for persistent storage.

Login to your okd4-services VM and begin to set up an NFS server. The following commands install the necessary packages, enable services, and configure file and folder permissions.

sudo yum install –y nfs-utils
sudo systemctl enable nfs-server rpcbind
sudo systemctl start nfs-server rpcbind nfs-lock-nfs-idmap
sudo mkdir –p /var/nfsshare/registry
sudo chmod –R 777 /var/nfsshare
sudo chown –R nfsnobody:nfsnobody /var/nfsshare

Create an NFS Export

sudo vi /etc/exports

Add this line in the new /etc/exports file “/var/nfsshare 192.168.1.0/24(rw,sync,no_root_squash,no_all_squash,no_wdelay)”

Restart the nfs-server service and add firewall rules:

sudo setsebool -P nfs_export_all_rw 1
sudo systemctl restart nfs-server
sudo firewall-cmd --permanent --zone=public --add-service mountd
sudo firewall-cmd --permanent --zone=public --add-service rpc-bind
sudo firewall-cmd --permanent --zone=public --add-service nfs
sudo firewall-cmd --reload

Registry configuration:

Create a persistent volume on the NFS share. Use the registry_py.yaml in okd4_files folder from the git repo:

oc create -f okd4_files/registry_pv.yaml
oc get pv

Edit the image-registry operator:

oc edit configs.imageregistry.operator.openshift.io

Change the managmentState: from Removed to Managed. Under storage: add the pvc: and claim: blank to attach the PV and save your changes automatically:

managementStage: Managed
storage:
    pvc:
      claim:

Check your persistent volume, and it should now be claimed:

oc get pv

To test the registry and underlying storage, create a new php project in OKD and use the example repository. Check your NFS export on okd4-services for data:

Create Wordpress Project:

Create a new project.

oc new-project wordpress-test

Create a new app using the centos php73 s2i image from dockerhub and use the WordPress GitHub repo for the source. Also expose the service to create a route.

oc new-app centos/php-73-centos7~https://github.com/WordPress/WordPress.git
oc expose svc/wordpress

Create a new app using the centos7 mariadb image.

oc new-app centos/mariadb-103-centos7 --name mariadb --env MYSQL_DATABASE=wordpress --env MYSQL_USER=wordpress --env MYSQL_PASSWORD=wordpress

Open the route url and setup WordPress using mariadb (the service name) as the database host.

HTPasswd Setup:

The kubeadmin is a temporary user. The easiest way to set up a local user is with htpasswd.

htpasswd -c -B -b </path/to/users.htpasswd> <user_name> <password>

Create a secret in the openshift-config project using the users.htpasswd file you generated:

oc create secret generic htpass-secret --from-file=htpasswd=users.htpasswd -n openshift-config

Add the identity provider.

oc apply -f okd4_files/htpasswd_provider.yaml

Login with my_htpasswd_provider using the username and password you created:

Bind the cluster-admin role to your user:

oc adm policy add-cluster-role-to-user cluster-admin <username>

Your user should now have cluster-admin level access:

To report issues, use the OKD Github Repo: https://github.com/openshift/okd

For support check out the #openshift-users channel on k8s Slack

The OKD Working Group meets bi-weekly to discuss the development and next steps. The meeting schedule and location are tracked in the openshift/community repo.

Google group for okd-wg: https://groups.google.com/forum/#!forum/okd-wg

This guide should get you up and started in the right direction. Good luck on your journey with OpenShift!

Openshift
Okd
Kubernetes
Coreos
Homelab
Recommended from ReadMedium