• minikube 构建 单机 Kubernetes


    $ curl -Lo kubectl 
    http://storage.googleapis.com/kubernetes-release/
    release/v1.3.0/bin/linux/amd64/kubectl 
    && chmod +x kubectl 
    && sudo mv kubectl /usr/local/bin/
    
    
    $ sudo curl -L 
     https://github.com/dhiltgen/docker-machine-kvm/
     releases/download/v0.7.0/docker-machine-driver-kvm 
     -o /usr/local/bin/docker-machine-driver-kvm
     $ sudo chmod +x /usr/local/bin/docker-machine-driver-kvm
    
    
     $ curl -Lo minikube 
    https://storage.googleapis.com/minikube/
    releases/v0.6.0/minikube-linux-amd64 
    && chmod +x minikube 
    && sudo mv minikube /usr/local/bin/
    
    
    $ minikube start --vm-driver=kvm
    Starting local Kubernetes cluster...
    Kubernetes is available at https://192.168.42.213:8443.
    Kubectl is now configured to use the cluster.
    
    
    $ kubectl run hello-minikube 
    --image=gcr.io/google_containers/echoserver:1.4 
    --port=8080
    deployment “hello-minikube” created
    $ kubectl expose deployment hello-minikube --type=NodePort
    service “hello-minikube” exposed
    
    
    $ kubectl get pod
    NAME            READY     STATUS    RESTARTS   AGE
    hello-minikube-2433534028-ouxw8   1/1       Running   0      4m
    
    
    $ curl $(minikube service hello-minikube --url)
    CLIENT VALUES:
    client_address=172.17.0.1
    command=GET
    real path=/
    query=nil
    request_version=1.1
    request_uri=http://192.168.42.213:8080/
    SERVER VALUES:
    server_version=nginx: 1.10.0 - lua: 10001
    HEADERS RECEIVED:
    accept=*/*
    host=192.168.42.213:31759
    user-agent=curl/7.35.0
    BODY:
    -no body in request-
    
    
    $ minikube dashboard
    
    
    $ minikube stop
    Stopping local Kubernetes cluster...
    Stopping “minikubeVM”...
    
    
    $ minikube start --vm-driver=kvm
    
    
    $ minikube delete
    
    
    $ minikube addons enable heapster
    
    WARNING: No any other purpose,keeping reminded! So sorry to offended,if necessary, contact me and I do change what I had done to protect your privileges!
  • 相关阅读:
    NIS server on centOS 7
    fabric-python-基于centos 7
    玩玩Jenkins
    身份认证技术性能对比
    Linux时区设置和时间同步-基于CentOS 6(最小安装)
    openldap+phpadmin的最简安装和配置
    tomcat8.5的网页管理(远程)配置、SSL证书配置-基于Debian 9
    tomcat添加为service服务-基于Debian 9
    安装、配置MySQL5.8基于Debian 9(用apt-get install 默认安装结果是mariadb)
    下载并配置jdk环境-基于debain 9
  • 原文地址:https://www.cnblogs.com/MimiSnowing/p/14861943.html
Copyright © 2020-2023  润新知