gvm install go1.8 gvm use go1.8 gvm pkgenvThis pops $EDITOR which you can use to set your go path to $HOME/go. Check it with:
go env
gvm install go1.8 gvm use go1.8 gvm pkgenvThis pops $EDITOR which you can use to set your go path to $HOME/go. Check it with:
go env
export PATH=/tmp:$PATH cd /tmp; curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl; chmod 555 kubectlNodes
$ kubectl get nodes $ kubectl get nodes/gke-hello-world-default-pool-9dbb0d2c-5qkl --show-labels $ kubectl label nodes --all mylabel=myvalue $ kubectl label nodes --all mylabel-
$ kubectl get all -n mynamespaceRBAC
kubectl auth can-i --listAll clusterrolebindings:
kubectl get clusterrolebinding -o yamlRole bindings for all namespaces:
kubectl get rolebinding --all-namespaces -o yamlPrivileges of current user:
kubectl create -f - -o yaml << EOF apiVersion: authorization.k8s.io/v1 kind: SelfSubjectRulesReview spec: namespace: system EOF
$ echo 'apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: daemonset-example
spec:
template:
metadata:
labels:
app: daemonset-example
spec:
containers:
- name: daemonset-example
image: ubuntu:trusty
command:
- /bin/sh
args:
- -c
- >-
while [ true ]; do
echo "DaemonSet running on $(hostname)" ;
sleep 10 ;
done
' | kubectl create -f -
$ kubectl delete daemonset daemonset-example
$ kubectl run --rm=true -i --tty ubuntu --image=ubuntu -- /bin/bash # Or with an existing container $ kubectl exec -it shell-demo -- /bin/bash
gcloud components install kubectl gcloud auth application-default loginCreating a cluster with a specific version:
gcloud config set compute/zone us-west1-b
gcloud beta container clusters create permissions-test-cluster \
--cluster-version=1.6.1 \
--no-enable-legacy-authorization
Upgrading GKE:
# Get available versions $ gcloud container get-server-config Fetching server config for us-west1-b defaultClusterVersion: 1.5.7 defaultImageType: COS validImageTypes: - COS - CONTAINER_VM validMasterVersions: - 1.6.4 - 1.5.7 validNodeVersions: - 1.6.4 - 1.6.2 - 1.5.7 - 1.5.6 - 1.4.9 $ CLUSTER_NAME="testing" $ CLUSTER_VERSION="1.6.4" # Nodes $ gcloud container clusters upgrade $CLUSTER_NAME --cluster-version=$CLUSTER_VERSION # Master $ gcloud container clusters upgrade $CLUSTER_NAME --master --cluster-version=$CLUSTER_VERSIONList containers in the google-containers project:
gcloud container images list --repository gcr.io/google-containersTags for a given container:
gcloud container images list-tags gcr.io/gke-release/auditproxy
# See config gcloud config list # Change default zone gcloud config set compute/zone us-central1-a # Copy a file, default zone gcloud compute copy-files some/file.txt cloud-machine-name:~/ # Copy a file, specifying zone for machine gcloud compute copy-files some/file.txt cloud-machine-name:~/ --zone=us-west1-a # Forward a port with ssh gcloud compute ssh client-machine-name -- -L 8080:localhost:8080
Host *
UseKeyChain no
As you can see in the radar report, deleting keys using "ssh-add -D" seems to be just as problematic and confusing as it is with gnome-keyring, i.e. "All identities removed" is a lie.echo "package hold" | sudo dpkg --set-selectionsTo undo the hold and go back to normal:
echo "package install" | sudo dpkg --set-selections
sudo apt-get install build-essential libreadline-dev libsqlite3-dev
./configure --enable-ipv6 --enable-unicode=ucs4 --prefix=/usr/local/${USER}/
make
sudo make install
Your new python is now in /usr/local/${USER}/bin/python2.7. To use it, specify it in any virtualenvs you create. Make it an alias so you never forget:
alias virtualenv='virtualenv --python=/usr/local/${USER}/bin/python'