美文网首页
microk8s开启helm

microk8s开启helm

作者: 小黑佬 | 来源:发表于2020-04-13 11:33 被阅读0次
    $ microk8s enable helm
    Enabling Helm
    Fetching helm version v2.16.0.
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 24.0M  100 24.0M    0     0  1590k      0  0:00:15  0:00:15 --:--:-- 1334k
    Helm is enabled
    
    $ microk8s.helm version
    Client: &version.Version{SemVer:"v2.16.0", GitCommit:"e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState:"clean"}
    Error: could not find tiller
    
    $ microk8s.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
    

    搜索heml

    $ microk8s.helm search nginx-ingress
    NAME                    CHART VERSION   APP VERSION     DESCRIPTION                                                 
    stable/nginx-ingress    1.36.0          0.30.0          An nginx Ingress controller that uses ConfigMap to store ...
    stable/nginx-lego       0.3.1                           Chart for nginx-ingress-controller and kube-lego    
    

    Add NGINX Helm repository:

    $ microk8s.helm repo add nginx-stable https://helm.nginx.com/stable
    $ microk8s.helm repo update
    
    $ microk8s.helm install --name my-release nginx-stable/nginx-ingress
    NAME:   my-release
    LAST DEPLOYED: Sat Apr 11 17:24:54 2020
    NAMESPACE: default
    STATUS: DEPLOYED
    
    RESOURCES:
    ==> v1/ConfigMap
    NAME                                      AGE
    my-release-nginx-ingress                  1s
    my-release-nginx-ingress-leader-election  1s
    
    ==> v1/Deployment
    NAME                      AGE
    my-release-nginx-ingress  0s
    
    ==> v1/Pod(related)
    NAME                                       AGE
    my-release-nginx-ingress-7b79c5b9f4-vj6zc  0s
    
    ==> v1/Secret
    NAME                                            AGE
    my-release-nginx-ingress-default-server-secret  1s
    
    ==> v1/Service
    NAME                      AGE
    my-release-nginx-ingress  0s
    
    ==> v1/ServiceAccount
    NAME                      AGE
    my-release-nginx-ingress  1s
    
    ==> v1beta1/ClusterRole
    NAME                      AGE
    my-release-nginx-ingress  1s
    
    ==> v1beta1/ClusterRoleBinding
    NAME                      AGE
    my-release-nginx-ingress  1s
    
    ==> v1beta1/CustomResourceDefinition
    NAME                               AGE
    virtualserverroutes.k8s.nginx.org  1s
    virtualservers.k8s.nginx.org       1s
    
    
    NOTES:
    The NGINX Ingress Controller has been installed.
    

    $ microk8s.kubectl get services
    NAME                       TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
    kubernetes                 ClusterIP      10.152.183.1     <none>        443/TCP                      6h31m
    my-release-nginx-ingress   LoadBalancer   10.152.183.105   <pending>     80:31738/TCP,443:30270/TCP   4m59s
    
    $ curl  10.152.183.105 
    <html>
    <head><title>404 Not Found</title></head>
    <body>
    <center><h1>404 Not Found</h1></center>
    <hr><center>nginx/1.17.9</center>
    </body>
    </html>
    

    相关文章

      网友评论

          本文标题:microk8s开启helm

          本文链接:https://www.haomeiwen.com/subject/zpjumhtx.html