kube helm wordpress

root@kubernetes ~]# yum install https://centos.pkgs.org/7/harbottle-main-x86_64/helm-2.14.3-1.el7.harbottle.x86_64.rpm

Loaded plugins: fastestmirror, langpacks
Cannot open: https://centos.pkgs.org/7/harbottle-main-x86_64/helm-2.14.3-1.el7.harbottle.x86_64.rpm. Skipping.
Error: Nothing to do
[root@kubernetes ~]#
[root@kubernetes ~]# yum install https://copr-be.cloud.fedoraproject.org/results/harbottle/main/epel-7-x86_64/00989160-helm/helm-2.14.3-1.el7.harbottle.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
helm-2.14.3-1.el7.harbottle.x86_64.rpm                          |  26 MB  00:07:49   
Examining /var/tmp/yum-root-3VTFqq/helm-2.14.3-1.el7.harbottle.x86_64.rpm: helm-2.14.3-1.el7.harbottle.x86_64
Marking /var/tmp/yum-root-3VTFqq/helm-2.14.3-1.el7.harbottle.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package helm.x86_64 0:2.14.3-1.el7.harbottle will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
 Package
        Arch     Version                   Repository                             Size
=======================================================================================
Installing:
 helm   x86_64   2.14.3-1.el7.harbottle    /helm-2.14.3-1.el7.harbottle.x86_64   113 M

Transaction Summary
=======================================================================================
Install  1 Package

Total size: 113 M
Installed size: 113 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : helm-2.14.3-1.el7.harbottle.x86_64                                  1/1
  Verifying  : helm-2.14.3-1.el7.harbottle.x86_64                                  1/1

Installed:
  helm.x86_64 0:2.14.3-1.el7.harbottle                                               

Complete!
[root@kubernetes ~]# helm install --namespace varmywordpress --name wordpress stable/wordpress
Error: could not find tiller
[root@kubernetes ~]# kubectl create serviceaccount --namespace kube-system tiller
serviceaccount/tiller created
[root@kubernetes ~]# kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
clusterrolebinding.rbac.authorization.k8s.io/tiller-cluster-rule created
[root@kubernetes ~]# kubectl edit deploy --namespace kube-system tiller-deploy
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
[root@kubernetes ~]# helm install --namespace varmywordpress --name wordpress stable/wordpress
Error: could not find tiller
[root@kubernetes ~]# ls
anaconda-ks.cfg  Downloads             minikube-linux-amd64  Public
Desktop          initial-setup-ks.cfg  Music                 Templates
Documents        kubectl               Pictures              Videos
[root@kubernetes ~]# kubectl edit deploy --namespace kube-system tiller-deploy
Error from server (NotFound): deployments.extensions "tiller-deploy" not found
[root@kubernetes ~]# helm init
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.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 /root/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation

Warning: You appear to be using an unreleased version of Helm. Please either use the
--canary-image flag, or specify your desired tiller version with --tiller-image.

Ex:
$ helm init --tiller-image gcr.io/kubernetes-helm/tiller:v2.8.2

[root@kubernetes ~]# helm install --namespace varmywordpress --name wordpress stable/wordpress
Error: could not find a ready tiller pod
[root@kubernetes ~]# kubectl edit deploy --namespace kube-system tiller-deploy
error: deployments.extensions "tiller-deploy" is invalid
A copy of your changes has been stored to "/tmp/kubectl-edit-1h3e9.yaml"
error: Edit cancelled, no valid changes were saved.
[root@kubernetes ~]# kubectl edit deploy --namespace kube-system tiller-deploy
error: deployments.extensions "tiller-deploy" is invalid
A copy of your changes has been stored to "/tmp/kubectl-edit-ma3pg.yaml"
error: Edit cancelled, no valid changes were saved.
[root@kubernetes ~]# helm install --namespace varmywordpress --name wordpress stable/wordpress
NAME:   wordpress
LAST DEPLOYED: Wed Sep  4 22:32:30 2019
NAMESPACE: varmywordpress
STATUS: DEPLOYED

RESOURCES:
==> v1/ConfigMap
NAME                     DATA  AGE
wordpress-mariadb        1     7s
wordpress-mariadb-tests  1     7s

==> v1/Deployment
NAME       READY  UP-TO-DATE  AVAILABLE  AGE
wordpress  0/1    1           0          3s

==> v1/PersistentVolumeClaim
NAME       STATUS   VOLUME    CAPACITY  ACCESS MODES  STORAGECLASS  AGE
wordpress  Pending  standard  7s        Filesystem

==> v1/Pod(related)
NAME                      READY  STATUS   RESTARTS  AGE
wordpress-c565557d-68zkj  0/1    Pending  0         3s
wordpress-mariadb-0       0/1    Pending  0         1s

==> v1/Secret
NAME               TYPE    DATA  AGE
wordpress          Opaque  1     7s
wordpress-mariadb  Opaque  2     7s

==> v1/Service
NAME               TYPE          CLUSTER-IP      EXTERNAL-IP  PORT(S)                     AGE
wordpress          LoadBalancer  10.111.146.209  <pending>    80:30713/TCP,443:30716/TCP  3s
wordpress-mariadb  ClusterIP     10.96.123.111   <none>       3306/TCP                    6s

==> v1beta1/StatefulSet
NAME               READY  AGE
wordpress-mariadb  0/1    2s


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 varmywordpress -w wordpress'
  export SERVICE_IP=$(kubectl get svc --namespace varmywordpress wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
  echo "WordPress URL: http://$SERVICE_IP/"
  echo "WordPress Admin URL: http://$SERVICE_IP/admin"

2. Login with the following credentials to see your blog

  echo Username: user
  echo Password: $(kubectl get secret --namespace varmywordpress wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)

[root@kubernetes ~]#

Comments