User Tools

Site Tools


kubernetes_install_on_fedora

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kubernetes_install_on_fedora [2018/04/09 09:47]
rpjday [cluster/get-kube-binaries.sh]
kubernetes_install_on_fedora [2018/04/09 10:15] (current)
rpjday [cluster/get-kube-binaries.sh]
Line 85: Line 85:
 </​code>​ </​code>​
  
-What happens:+The client tarball consists of the single executable ''​kubectl'':​ 
 + 
 +<​code>​ 
 +$ tar tvf kubernetes-client-linux-amd64.tar.gz  
 +drwxr-xr-x root/​root ​        0 2018-03-26 13:46 kubernetes/​ 
 +drwxr-xr-x root/​root ​        0 2018-03-26 13:46 kubernetes/​client/​ 
 +drwxr-xr-x root/​root ​        0 2018-03-26 13:46 kubernetes/​client/​bin/​ 
 +-rwxr-xr-x root/​root ​ 54277699 2018-03-26 13:46 kubernetes/​client/​bin/​kubectl 
 +
 +</​code>​ 
 + 
 +which will be "​installed"​ and which you'll have to add to your search path shortly. 
 + 
 +Here's the ''​extract_arch_tarball()''​ function in that script:
  
 <​code>​ <​code>​
Line 104: Line 117:
 </​code>​ </​code>​
  
-The client tarball consists ​of nothing but ''​kubernetes/client/bin/​kubectl''​.+In short, from the ''​${KUBE_ROOT}''​ directory (and in the context ​of a 64-bit Fedora system), extract that single ​''​kubectl''​ executable:​ 
 + 
 +<​code>​ 
 +$ mkdir -p platforms/linux/​amd64 
 +$ tar xvf ../​kubernetes-client-linux-amd64.tar.gz \ 
 +> --strip-components 3 \ 
 +> -C platforms/linux/amd64 
 +
 +</​code>​ 
 + 
 +<​code>​ 
 +$ tree platforms 
 +platforms 
 +└── linux 
 +    └── amd64 
 +        └── ​kubectl 
 +
 +</​code>​ 
 + 
 +Finally, make sure you can find ''​kubectl''​ on your search path somehow: 
 + 
 +<​code>​ 
 +PATH=$PATH:/​home/​rpjday/​kubernetes/​dl/​kubernetes/​platforms/​linux/​amd64 
 +</​code>​
 ===== create_cluster ===== ===== create_cluster =====
 +
 +==== Overview ====
 +
 +This function kicks off a new cluster:
 +
 +<​code>​
 +function create_cluster {
 +  if [[ -n "​${KUBERNETES_SKIP_CREATE_CLUSTER-}"​ ]]; then
 +    exit 0
 +  fi
 +  echo "​Creating a kubernetes on ${KUBERNETES_PROVIDER:​-gce}..."​
 +  (
 +    cd kubernetes
 +    ./​cluster/​kube-up.sh
 +    echo "​Kubernetes binaries at ${PWD}/​cluster/"​
 +    if [[ ":​$PATH:"​ != *":​${PWD}/​cluster:"​* ]]; then
 +      echo "You may want to add this directory to your PATH in \$HOME/​.profile"​
 +    fi
 +
 +    echo "​Installation successful!"​
 +  )
 +}
 +</​code>​
 +
 +You might want to add the ''​cluster/''​ directory to your search path for later:
 +
 +<​code>​
 +PATH=$PATH:/​home/​rpjday/​kubernetes/​dl/​kubernetes/​cluster
 +</​code>​
 +==== create_cluster() ====
 +
 +This function calls the underlying script ''​cluster/​kube-up.sh'':​
 +
 +<​code>​
 +function create_cluster {
 +  if [[ -n "​${KUBERNETES_SKIP_CREATE_CLUSTER-}"​ ]]; then
 +    exit 0
 +  fi
 +  echo "​Creating a kubernetes on ${KUBERNETES_PROVIDER:​-gce}..."​
 +  (
 +    cd kubernetes
 +    ./​cluster/​kube-up.sh
 +    echo "​Kubernetes binaries at ${PWD}/​cluster/"​
 +    if [[ ":​$PATH:"​ != *":​${PWD}/​cluster:"​* ]]; then
 +      echo "You may want to add this directory to your PATH in \$HOME/​.profile"​
 +    fi
 +
 +    echo "​Installation successful!"​
 +  )
 +}
 +</​code>​
kubernetes_install_on_fedora.1523267255.txt.gz · Last modified: 2018/04/09 09:47 by rpjday