Tuesday, 9 June 2020

Error: could not find tiller - Helm init

My first post on on Cloud Native... this is with Helm.

[root@unicamaster software]#   helm install --name nginx stable/nginx-ingress -f ./omnix-unica/extra-configs/nginx-conf.yaml
Error: could not find tiller
[root@unicamaster software]# cd tmp
[root@unicamaster tmp]# l s-l
bash: l: command not found...
[root@unicamaster tmp]# l s-l
bash: l: command not found...
[root@unicamaster tmp]# ls -l
total 0
[root@unicamaster tmp]# gunzip -c ../helm-v2.15.2-linux-amd64.tar.gz | tar -xvf -
linux-amd64/
linux-amd64/tiller
linux-amd64/helm
linux-amd64/README.md
linux-amd64/LICENSE
[root@unicamaster tmp]# ls -l
total 0
drwxr-xr-x 2 root root 64 Oct 30  2019 linux-amd64
[root@unicamaster tmp]# cd *
[root@unicamaster linux-amd64]# ls -l
total 76720
-rwxr-xr-x 1 root root 38789120 Oct 30  2019 helm
-rw-r--r-- 1 root root    11343 Oct 30  2019 LICENSE
-rw-r--r-- 1 root root     3288 Oct 30  2019 README.md
-rwxr-xr-x 1 root root 39755776 Oct 30  2019 tiller
[root@unicamaster linux-amd64]# tiller
bash: tiller: command not found...
[root@unicamaster linux-amd64]# ./tiller
[main] 2020/06/09 14:12:58 Starting Tiller v2.15.2 (tls=false)
[main] 2020/06/09 14:12:58 GRPC listening on :44134
[main] 2020/06/09 14:12:58 Probes listening on :44135
[main] 2020/06/09 14:12:58 Storage driver is ConfigMap
[main] 2020/06/09 14:12:58 Max history per release is 0
^C
[root@unicamaster linux-amd64]# l s-l
bash: l: command not found...
[root@unicamaster linux-amd64]# cp -p tiller /usr/local/bin
[root@unicamaster linux-amd64]# ls -l /usr/local/bin
total 76704
lrwxrwxrwx 1 root root       30 Apr 27 11:19 db2greg -> /opt/ibm/db2/V11.1/bin/db2greg
lrwxrwxrwx 1 root root       32 Apr 27 11:19 db2ls -> /opt/ibm/db2/V11.1/install/db2ls
-rwxr-xr-x 1 root root 38789120 Oct 30  2019 helm
-rwxr-xr-x 1 root root 39755776 Oct 30  2019 tiller
[root@unicamaster linux-amd64]# pwd
/opt/software/tmp/linux-amd64
[root@unicamaster linux-amd64]# cd ..
[root@unicamaster tmp]# cd ..
[root@unicamaster software]# pwd
/opt/software
[root@unicamaster software]# l s-l
bash: l: command not found...
[root@unicamaster software]# pwd
/opt/software
[root@unicamaster software]# ls -l
total 23952
-rwxr-x--- 1 root root 24525846 Apr 27 11:10 helm-v2.15.2-linux-amd64.tar.gz
drwxr-x--- 6 root root      288 Jun  9 13:56 omnix-unica
drwxr-xr-x 3 root root       25 Jun  9 14:12 tmp
drwxr-xr-x 2 root root      135 Jun  9 12:51 unica.12.0.0.0
drwxr-xr-x 2 root root       69 Jun  9 13:26 unica.12.0.0.1
[root@unicamaster software]#   helm install --name nginx stable/nginx-ingress -f ./omnix-unica/extra-configs/nginx-conf.yaml
Error: could not find tiller
[root@unicamaster software]# help init
bash: help: no help topics match `init'.  Try `help help' or `man -k init' or `info init'.
[root@unicamaster software]# 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
[root@unicamaster software]#   helm install --name nginx stable/nginx-ingress -f ./omnix-unica/extra-configs/nginx-conf.yaml
Error: could not find a ready tiller pod
[root@unicamaster software]#  kubectl create serviceaccount --namespace kube-system tiller
serviceaccount/tiller created
[root@unicamaster software]#   helm install --name nginx stable/nginx-ingress -f ./omnix-unica/extra-configs/nginx-conf.yaml
Error: release nginx failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "default"
[root@unicamaster software]# kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
clusterrolebinding.rbac.authorization.k8s.io/tiller-cluster-rule created
[root@unicamaster software]# kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
deployment.apps/tiller-deploy patched
[root@unicamaster software]# helm version
Client: &version.Version{SemVer:"v2.15.2", GitCommit:"8dce272473e5f2a7bf58ce79bb5c3691db54c96b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.15.2", GitCommit:"8dce272473e5f2a7bf58ce79bb5c3691db54c96b", GitTreeState:"clean"}
[root@unicamaster software]#   helm install --name nginx stable/nginx-ingress -f ./omnix-unica/extra-configs/nginx-conf.yaml
NAME:   nginx
LAST DEPLOYED: Tue Jun  9 14:20:49 2020
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/ClusterRole
NAME                 AGE
nginx-nginx-ingress  1s

==> v1/ClusterRoleBinding
NAME                 AGE
nginx-nginx-ingress  1s

==> v1/ConfigMap
NAME                            DATA  AGE
nginx-nginx-ingress-controller  1     1s

==> v1/Deployment
NAME                                 READY  UP-TO-DATE  AVAILABLE  AGE
nginx-nginx-ingress-controller       0/1    1           0          1s
nginx-nginx-ingress-default-backend  0/1    1           0          1s

==> v1/Pod(related)
NAME                                                  READY  STATUS             RESTARTS  AGE
nginx-nginx-ingress-controller-7fc9499f7b-96h99       0/1    ContainerCreating  0         0s
nginx-nginx-ingress-default-backend-679f548db6-tq2vz  0/1    ContainerCreating  0         1s

==> v1/Role
NAME                 AGE
nginx-nginx-ingress  1s

==> v1/RoleBinding
NAME                 AGE
nginx-nginx-ingress  1s

==> v1/Service
NAME                                    TYPE          CLUSTER-IP     EXTERNAL-IP  PORT(S)                     AGE
nginx-nginx-ingress-controller          LoadBalancer  10.97.49.16    <pending>    80:32500/TCP,443:31138/TCP  1s
nginx-nginx-ingress-controller-metrics  ClusterIP     10.108.50.227  <none>       9913/TCP                    1s
nginx-nginx-ingress-default-backend     ClusterIP     10.97.62.215   <none>       80/TCP                      1s

==> v1/ServiceAccount
NAME                         SECRETS  AGE
nginx-nginx-ingress          1        1s
nginx-nginx-ingress-backend  1        1s


NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w nginx-nginx-ingress-controller'

An example Ingress that makes use of the controller:

  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    name: example
    namespace: foo
  spec:
    rules:
      - host: www.example.com
        http:
          paths:
            - backend:
                serviceName: exampleService
                servicePort: 80
              path: /
    # This section is only required if TLS is to be enabled for the Ingress
    tls:
        - hosts:
            - www.example.com
          secretName: example-tls

If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:

  apiVersion: v1
  kind: Secret
  metadata:
    name: example-tls
    namespace: foo
  data:
    tls.crt: <base64 encoded cert>
    tls.key: <base64 encoded key>
  type: kubernetes.io/tls

No comments:

Post a Comment

PVC in terminating state

Referencee:https://veducate.co.uk/kubernetes-pvc-terminating/  I still had errors performing deployment, till I released that although I pre...