Site icon Learning & Doing

Cara Remote Rancher kubctl dari local environtment

Pada hari ini saya akan membahas Cara Remote Rancher kubctl dari local environtment . Berikut cara nya .

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

 install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

kubectl version --client
nano .kube/config
masukan file tersebut
kubectl get node
NAME           STATUS   ROLES               AGE   VERSION
kube-manager   Ready    controlplane,etcd   22d   v1.17.17
kube-worker1   Ready    etcd,worker         22d   v1.17.17
kube-worker2   Ready    etcd,worker         22d   v1.17.17
kubectl create -f metricbeat-kubernetes.yaml
kubectl delete -f metricbeat-kubernetes.yaml

Sumber : https://rancher.com/docs/rancher/v2.x/en/cluster-admin/cluster-access/kubectl/

Exit mobile version