You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
570 B
Bash
25 lines
570 B
Bash
#!/bin/bash
|
|
set -e
|
|
set -o noglob
|
|
|
|
function usage() {
|
|
echo "Requires argument cluster_name and domain_name in server fqdn {cluster_name} {domain_name}"
|
|
}
|
|
|
|
function main() {
|
|
local cluster_name="${1}"; shift
|
|
local domain_name="${1:-meissa-gmbh.de}"; shift
|
|
|
|
/usr/local/bin/k3s-create-context.sh ${cluster_name}
|
|
kubectl config use-context ${cluster_name}
|
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${cluster_name}.${domain_name} -L 8002:localhost:8002 -L 6443:192.168.5.1:6443
|
|
}
|
|
|
|
if [ $# -gt 0 ]
|
|
then
|
|
main $1
|
|
else
|
|
usage
|
|
exit -1
|
|
fi
|