-1

I am installing my own cluster in order to practice the k8s. I have created cluster on the google cloud.

$kubectl get all
NAME                           READY   STATUS    RESTARTS   AGE
pod/webapp1-7d67d68676-k9hhl   1/1     Running   0          2h
pod/webapp2-64d4844b78-9kln5   1/1     Running   0          2h
pod/webapp3-5b8ff7484d-zvcsf   1/1     Running   0          2h

NAME                  TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
service/kubernetes    ClusterIP   10.51.240.1     <none>        443/TCP   3h
service/webapp1-svc   ClusterIP   10.51.240.184   <none>        80/TCP    2h
service/webapp2-svc   ClusterIP   10.51.246.184   <none>        80/TCP    2h
service/webapp3-svc   ClusterIP   10.51.244.85    <none>        80/TCP    2h

NAME                      DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/webapp1   1         1         1            1           2h
deployment.apps/webapp2   1         1         1            1           2h
deployment.apps/webapp3   1         1         1            1           2h

NAME                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/webapp1-7d67d68676   1         1         1       2h
replicaset.apps/webapp2-64d4844b78   1         1         1       2h
replicaset.apps/webapp3-5b8ff7484d   1         1         1       2h

Proceed installation

$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scri
pts/get > get_helm.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7234  100  7234    0     0  21921      0 --:--:-- --:--:-- --:--:-- 22892
sarit_r@gke-singh-default-pool-a69fa545-1sm3 ~ $ chmod 700 get_helm.sh
sarit_r@gke-singh-default-pool-a69fa545-1sm3 ~ $ ./get_helm.sh
-bash: ./get_helm.sh: Permission denied

sudo su to become a root already, but problem still persist.

# sh get_helm.sh 
Downloading https://kubernetes-helm.storage.googleapis.com/helm-v2.13.0-linux-amd64.tar.gz
Preparing to install helm and tiller into /usr/local/bin
cp: cannot create regular file '/usr/local/bin': Read-only file system
Failed to install helm
        For support, go to https://github.com/helm/helm.
gke-singh-default-pool-a69fa545-1sm3 /home/sarit_r # id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),26(tape),27(vide
o),1001(chronos-access)

master: 1.11.7-gke.4 node: 1.11.7-gke.4

Question:

How do I install helm on Google Cluster?

Stone
  • 161
  • 8
  • 1
    Looks like a local permission issue, not in the cluster. Does the `/usr/local/bin` folder exist in your workstation? – whites11 Mar 06 '19 at 07:03
  • I am running into this problem on GCE too. After SSHing into my box, and switching to root, I have no ability to write to the filesystem. I have verified that I am in the correct directory with the corrrect permissions. # mkdir test `mkdir: cannot create directory ‘test’: Read-only file system` Has anyone else run into this issue and been able to solve it? – tdensmore Feb 24 '20 at 19:04

2 Answers2

0

In my case this problem may have been created when I cloned my GCE instance using the create similar button. I suspect my three instances were using the same boot disk volume, which locked it in Read Only mode.

I had to delete my instances and re-create them to fix my issue.

tdensmore
  • 101
  • 3
0

The issue that you experienced is caused by the permissions of the OS. You will be able to change it on the following directory: /usr/local/bin

Hope this helps.

  • Thank you for your answer. I couldn't be able to confirm your answer. After a week later. I come back to project and the problem is gone. I suspect it was permission conflict like you said. Because I have updated and upgraded my software a lot. – Stone Mar 15 '19 at 15:28