Showing posts from November, 2018

How to find kubernetes cluster token

Welcome to Linux guru, In this article i will explain you how to get kubernetes cluster token and certificate information by commands. Connect your kubernetes cluster using glocud command to your local machine. $ gcloud container clusters get-credentials clustername  --zone \ europe-west1-d --project projectname Once your kubernetes cluster connected to your local machine, lets find out token and other information. You will need to find out secret first. $ kubectl get secret NAME                  TYPE                                  DATA      AGE default-token- 7Dghp   3         3d Now, we will get token information using that secret which we got from above command. $  kubectl -o json get secret default-token-7Dghp | jq -r \ '.data.token' | base64 -d (Replace your secret in above command). Token Output :  sdklwksdKLJJDKASKLFkljfasjflaskfjasjflasjflkjasdfjasjfklasfjasfasfjskjfjslfkjkljfaksjfkljfkl

Install kubectl in linux

Kubectl is a kubernetes command line tool. You can deploy and manage application in kubernetes using kubectl.Using kubectl, you can inspect cluster resources; create, delete, and update components. Install Kubectl ubuntu/debian : sudo apt-get update && sudo apt-get install -y apt-transport-https curl -s | sudo apt-key add - echo "deb kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list sudo apt-get update sudo apt-get install -y kubectl Install kubectl on Centos / Fedora : cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl= enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey= EOF yum install -y kubectl Install with snap on Ubuntu : $su

How to reset gitlab root password

Login in your server with root access, then start ruby on rail consol and login. Start Rubi consol using below command :  gitlab-rails console production Wait until the console has loaded, you can search for email or username. user = User.where(id: 1).first or user = User.find_by(email: '') You can change your password from below commands : user.password = 'secret_pass' user.password_confirmation = 'secret_pass' It’s important that you change both password and password_confirmation to make it work. Don’t forget to save the changes.! Exit the console and try to login with your new password.