Last active
August 24, 2022 09:46
-
-
Save firemanxbr/66925231717530a6b20fcfb6c1f0b0e4 to your computer and use it in GitHub Desktop.
Step by step from scratch to run helm on Minishift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**NOTE** I'm using Minishift 13.0.1 | |
$ cat ~/.bashrc | |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= | |
export PATH=$PATH:/home/firemanxbr/minishift | |
export PATH="/home/firemanxbr/.minishift/cache/oc/v3.7.1/linux:$PATH" | |
export HELM_HOST="$(minishift ip):$(oc get svc/tiller -o jsonpath='{.spec.ports[0].nodePort}' -n kube-system --as=system:admin)" | |
export MINISHIFT_ADMIN_CONTEXT="default/$(oc config view -o jsonpath='{.contexts[?(@.name=="minishift")].context.cluster}')/system:admin" | |
$ minishift addons install --defaults | |
Default add-ons 'anyuid, admin-user, xpaas, registry-route' installed | |
$ minishift addons enable admin-user | |
Add-on 'admin-user' enabled | |
$ minishift start --profile minishift --disk-size 40gb --memory 6400mb --iso-url file:////home/firemanxbr/minishift/minishift.iso | |
-- Starting profile 'minishift' | |
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK | |
-- Checking if KVM driver is installed ... | |
Driver is available at /usr/local/bin/docker-machine-driver-kvm ... | |
Checking driver binary is executable ... OK | |
-- Checking if Libvirt is installed ... OK | |
-- Checking if Libvirt default network is present ... OK | |
-- Checking if Libvirt default network is active ... OK | |
-- Checking the ISO URL ... OK | |
-- Starting local OpenShift cluster using 'kvm' hypervisor ... | |
-- Minishift VM will be configured with ... | |
Memory: 6 GB | |
vCPUs : 2 | |
Disk size: 40 GB | |
-- Starting Minishift VM ................. OK | |
-- Checking for IP address ... OK | |
-- Checking if external host is reachable from the Minishift VM ... | |
Pinging 8.8.8.8 ... OK | |
-- Checking HTTP connectivity from the VM ... | |
Retrieving http://minishift.io/index.html ... OK | |
-- Checking if persistent storage volume is mounted ... OK | |
-- Checking available disk space ... 1% used OK | |
Importing 'openshift/origin:v3.7.1' CACHE MISS | |
Importing 'openshift/origin-docker-registry:v3.7.1' CACHE MISS | |
Importing 'openshift/origin-haproxy-router:v3.7.1' CACHE MISS | |
-- Downloading OpenShift binary 'oc' version 'v3.7.1' | |
38.51 MiB / 38.51 MiB [==========================================================================================================================================] 100.00% 0s-- Downloading OpenShift v3.7.1 checksums ... OK | |
-- OpenShift cluster will be configured with ... | |
Version: v3.7.1 | |
-- Checking 'oc' support for startup flags ... | |
host-pv-dir ... OK | |
host-volumes-dir ... OK | |
routing-suffix ... OK | |
host-config-dir ... OK | |
host-data-dir ... OK | |
Starting OpenShift using openshift/origin:v3.7.1 ... | |
Pulling image openshift/origin:v3.7.1 | |
Pulled 1/4 layers, 26% complete | |
Pulled 2/4 layers, 74% complete | |
Pulled 3/4 layers, 89% complete | |
Pulled 4/4 layers, 100% complete | |
Extracting | |
Image pull complete | |
OpenShift server started. | |
The server is accessible via web console at: | |
https://192.168.42.16:8443 | |
You are logged in as: | |
User: developer | |
Password: <any value> | |
To login as administrator: | |
oc login -u system:admin | |
-- Applying addon 'admin-user':.. | |
-- Exporting of OpenShift images is occuring in background process with pid 10109. | |
(This installation are running locally using the directory with this PR: https://github.com/minishift/minishift-addons/pull/92) | |
$ minishift addons install helm/ | |
Addon 'helm' installed | |
$ minishift addons apply helm | |
-- Applying addon 'helm':...... | |
Add into your ~/.bashrc this lines: | |
export HELM_HOST="$(minishift ip):$(oc get svc/tiller -o jsonpath='{.spec.ports[0].nodePort}' -n kube-system --as=system:admin)" | |
export KUBE_CONTEXT="default/$(oc config view -o jsonpath='{.contexts[?(@.name=="minishift")].context.cluster}')/system:admin" | |
Initialize the helm client, if not done already | |
e.g. | |
helm init -c | |
Search for an application: | |
e.g. | |
helm search | |
And now deploy an application | |
e.g. | |
helm version | |
To delete helm tiller | |
oc delete sa/helm deployment/tiller-deploy svc/tiller -n kube-system --as=system:admin | |
$ helm init -c | |
Creating /home/firemanxbr/.helm | |
Creating /home/firemanxbr/.helm/repository | |
Creating /home/firemanxbr/.helm/repository/cache | |
Creating /home/firemanxbr/.helm/repository/local | |
Creating /home/firemanxbr/.helm/plugins | |
Creating /home/firemanxbr/.helm/starters | |
Creating /home/firemanxbr/.helm/cache/archive | |
Creating /home/firemanxbr/.helm/repository/repositories.yaml | |
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com | |
Adding local repo with URL: http://127.0.0.1:8879/charts | |
$HELM_HOME has been configured at /home/firemanxbr/.helm. | |
Not installing Tiller due to 'client-only' flag having been set | |
Happy Helming! | |
$ helm search wordpress | |
NAME CHART VERSION APP VERSION DESCRIPTION | |
stable/wordpress 0.8.8 4.9.4 Web publishing platform for building blogs and ... | |
$ helm install stable/wordpress | |
NAME: killjoy-stoat | |
LAST DEPLOYED: Tue Mar 6 10:32:02 2018 | |
NAMESPACE: myproject | |
STATUS: DEPLOYED | |
RESOURCES: | |
==> v1/PersistentVolumeClaim | |
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE | |
killjoy-stoat-mariadb Bound pv0012 100Gi RWO,ROX,RWX 1s | |
killjoy-stoat-wordpress Bound pv0087 100Gi RWO,ROX,RWX 1s | |
==> v1/Service | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
killjoy-stoat-mariadb ClusterIP 172.30.34.130 <none> 3306/TCP 1s | |
killjoy-stoat-wordpress LoadBalancer 172.30.153.154 172.29.87.175,172.29.87.175 80:31817/TCP,443:32676/TCP 1s | |
==> v1beta1/Deployment | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
killjoy-stoat-mariadb 1 0 0 0 1s | |
killjoy-stoat-wordpress 1 1 1 0 0s | |
==> v1/Pod(related) | |
NAME READY STATUS RESTARTS AGE | |
killjoy-stoat-wordpress-3092961266-fszgg 0/1 ContainerCreating 0 0s | |
==> v1/Secret | |
NAME TYPE DATA AGE | |
killjoy-stoat-mariadb Opaque 2 1s | |
killjoy-stoat-wordpress Opaque 2 1s | |
==> v1/ConfigMap | |
NAME DATA AGE | |
killjoy-stoat-mariadb 1 1s | |
killjoy-stoat-mariadb-tests 1 1s | |
NOTES: | |
1. Get the WordPress URL: | |
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | |
Watch the status with: 'kubectl get svc --namespace myproject -w killjoy-stoat-wordpress' | |
export SERVICE_IP=$(kubectl get svc --namespace myproject killjoy-stoat-wordpress -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | |
echo http://$SERVICE_IP/admin | |
2. Login with the following credentials to see your blog | |
echo Username: user | |
echo Password: $(kubectl get secret --namespace myproject killjoy-stoat-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode) | |
$ oc get pods | |
NAME READY STATUS RESTARTS AGE | |
killjoy-stoat-wordpress-3092961266-fszgg 0/1 ContainerCreating 0 21s | |
**ERROR** | |
After start the wordpress I found this errors: | |
$ oc get pods | |
NAME READY STATUS RESTARTS AGE | |
killjoy-stoat-wordpress-3092961266-fszgg 0/1 CrashLoopBackOff 6 10m | |
Logs of this POD: | |
Welcome to the Bitnami wordpress container | |
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-wordpress | |
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-wordpress/issues | |
Send us your feedback at [email protected] | |
WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment. | |
INFO ==> Starting wordpress... | |
nami ERROR Cannot find any module matching the provided specification 'apache' | |
In that case this error is about this specific deployment and not about helm. I hope it. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment