Skip to content

Instantly share code, notes, and snippets.

View vukor's full-sized avatar

Anton Bugreev vukor

  • QuantumSoft
  • Serbia, Belgrade
View GitHub Profile
@vukor
vukor / get_kubeconfig_custom_cluster_rancher2.sh
Created May 8, 2019 07:18 — forked from superseb/get_kubeconfig_custom_cluster_rancher2.sh
Get kubeconfig for custom cluster in Rancher 2.0/2.1
#!/bin/bash
# Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name
# Needs to be run on the server running `rancher/rancher` container
# Check if jq exists
command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; }
# Check if clustername is given
if [ -z "$1" ]; then
echo "Usage: $0 [clustername]"