安装helm
- 下载helm二进制文件安装
student@ubuntu:~/helm$wget https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-linux-amd64.tar.g
--2018-12-11 10:09:35-- https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-linux-amd64.tar.g
Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.199.16, 2404:6800:4005:803::2010
Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.199.16|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-12-11 10:09:36 ERROR 404: Not Found.
student@ubuntu:~/helm$wget https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-linux-amd64.tar.gz
--2018-12-11 10:09:40-- https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-linux-amd64.tar.gz
Resolving storage.googleapis.com (storage.googleapis.com)... 216.58.197.112, 2404:6800:4005:801::2010
Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.197.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12169373 (12M) [application/x-tar]
Saving to: ‘helm-v2.7.0-linux-amd64.tar.gz.1’
helm-v2.7.0-linux-amd64.tar.gz.1 39%[===========================> helm-v2.7.0-linux-a 100%[===================>] 11.61M 1.42MB/s in 15s
2018-12-11 10:09:56 (787 KB/s) - ‘helm-v2.7.0-linux-amd64.tar.gz.1’ saved [12169373/12169373]
student@ubuntu:~/helm$tar zvxf helm-v2.7.0-linux-amd64.tar.gz
linux-amd64/
linux-amd64/README.md
linux-amd64/helm
linux-amd64/LICENSE
student@ubuntu:~/helm$cd linux-amd64/
student@ubuntu:~/helm/linux-amd64$ll
total 47496
drwxr-xr-x 2 student student 4096 Oct 24 2017 ./
drwxrwxr-x 5 student student 4096 Dec 11 10:09 ../
-rwxr-xr-x 1 student student 48608001 Oct 24 2017 helm*
-rw-r--r-- 1 student student 11373 Oct 24 2017 LICENSE
-rw-r--r-- 1 student student 3200 Oct 24 2017 README.md
student@ubuntu:~/helm/linux-amd64$cp helm /usr/bin/
cp: cannot create regular file '/usr/bin/helm': Permission denied
student@ubuntu:~/helm/linux-amd64$sudo cp helm /usr/bin/
[sudo] password for student:
- 给helm创建rbac的授权
student@ubuntu:~/helm/linux-amd64$kubectl create serviceaccount --namespace kube-system tiller
student@ubuntu:~/helm/linux-amd64$kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
3.部署tiller服务器
helm init -i ist0ne/tiller --service-account tiller
4.查看部署状态
student@ubuntu:~/helm/linux-amd64$helm version
Client: &version.Version{SemVer:"v2.7.0", GitCommit:"08c1144f5eb3e3b636d9775617287cc26e53dba4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.7.2", GitCommit:"8478fb4fc723885b155c924d1c8c410b7a9444e6", GitTreeState:"clean"}
student@ubuntu:~/helm/linux-amd64$helm home
/home/student/.helm
student@ubuntu:~/helm/linux-amd64$helm search nginx
NAME VERSION DESCRIPTION
private/nginx 0.2.0 A Helm chart for Kubernetes
student@ubuntu:~/helm/linux-amd64$helm install private/nginx
NAME: turbulent-hummingbird
LAST DEPLOYED: Tue Dec 11 10:17:42 2018
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
turbulent-hummingbird-nginx ClusterIP 10.110.54.86 <none> 80/TCP 1s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
turbulent-hummingbird-nginx 1 1 1 0 1s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
turbulent-hummingbird-nginx-7d9f5c4599-9qf46 0/1 ContainerCreating 0 0s
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace default -l "app=nginx,release=turbulent-hummingbird" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
student@ubuntu:~/helm/linux-amd64$helm list
NAME REVISION UPDATED STATUS CHART NAMESPACE
turbulent-hummingbird 1 Tue Dec 11 10:17:42 2018 DEPLOYEDnginx-0.2.0 default
5.添加helm仓库
student@ubuntu:~/helm/linux-amd64$helm repo add common http://storage.googleapis.com/kubernetes-charts
"common" has been added to your repositories
student@ubuntu:~/helm/linux-amd64$helm repo list
NAME URL
private http://172.30.81.194:88/charts
common http://storage.googleapis.com/kubernetes-charts
student@ubuntu:~/helm/linux-amd64$helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "private" chart repository
...Successfully got an update from the "common" chart repository
Update Complete. ⎈ Happy Helming!⎈
student@ubuntu:~/helm/linux-amd64$helm search database
NAME VERSION DESCRIPTION
common/cockroachdb 2.0.7 CockroachDB is a scalable, survivable, strongly...
common/dokuwiki 4.0.0 DokuWiki is a standards-compliant, simple to us...
common/ignite 1.0.0 Apache Ignite is an open-source distributed dat...
common/janusgraph 0.2.0 Open source, scalable graph database.
common/kubedb 0.1.3 DEPRECATED KubeDB by AppsCode - Making running ...
common/mariadb 5.2.3 Fast, reliable, scalable, and easy to use open-...
网友评论