Category: Kubernetes

Reset Kubernetes

$ kubeadm reset $ sudo systemctl stop kubelet $ sudo systemctl stop docker $ sudo rm -rf $HOME/.kube $ sudo rm -rf /etc/cni $ sudo rm -rf /var/lib/cni $ sudo rm -rf /var/lib/etcd $ sudo rm -rf /var/lib/kubelet/* $ sudo systemctl start docker $ sudo systemctl start kubelet

Install Kubernetes

# Requirement: Docker $ vi install-k8s.sh // == // #!/bin/bash # update repo sudo apt-get update # install apt-transport-https sudo apt-get install -y apt-transport-https # add the public key sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 3746C208A7317B0F # add the GPG key curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add – # add sources.list.d sudo touch /etc/apt/sources.list.d/kubernetes.list […]

Install operator-sdk

$ RELEASE_VERSION=v1.0.0 $ curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu $ chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu $ sudo mv operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk

Install KubeBuilder

# Requirement: Go # download kubebuilder and extract it to tmp $ curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) | tar -xz -C /tmp/ # move to a long-term location and put it on your path $ sudo mv /tmp/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder # add kubebuilder path $ echo ‘export PATH=$PATH:/usr/local/kubebuilder/bin’ >> ~/.bashrc […]