JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
Cloud-handbok
Schema
Lektions-PDFs
Moment & Kursmål
Slutinlämning
Tentamen
Start Till mål:
Hemövningar
Azure
CI/CD
Terminal / CLI
Docker
Kubernetes
NGINX
Säkerhet
Budget
YAML
Databas
More
Share
Explore
Kubernetes
Skapa en Kubeconfig-fil
Skapa en Kubernetes service
kubectl edit clusterrolebindings cluster-admin
Lägg till denna textrad längst ner ( med 2 mellanslag åt vänster):
- kind: ServiceAccount name: deploy
namespace: default
Kör:
sudo apt install jq
Få din Kubernetes secret:
kubectl get secret default-token-rrfll -ojson | jq -r '.data.token' | base64 -d
Använd följande Yaml-template och skriv in ditt genererade certifikat och token från ovan här i.
apiVersion: v1
kind: Config
users:
- name: minikube-cluster
user:
token: eyJhbGciOiJSUzI1NiIsImtpZCI6IlZ0bnY2WGRWZTU3RUlfeTZtTUdjZ0l3dEc3SzNXZWVsa2VlMXNtTm13WVUifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlcGxveS10b2tlbi14ZnFobSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJkZXBsb3kiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjOGVjNjk0ZC1iMzEwLTRmZWUtYmU1NC0xZDBmNjE1MzQ4N2UiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZXBsb3kifQ.WKVFtbPuwuTFwyCR_g_0PA1k7po64rSspvDwILowxtlnnSqEJBTihh3URRnbkpgnxa1hKPCnQ_dj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YU5aTUZjd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0hRWURWUjBPQkJZRUZGWEhvVGY4dUpyTjMwaXRNUXhGU1Q1OUNBc0VNQlVHQTFVZEVRUU8KTUF5Q0NtdDFZbVZ5Ym1WMFpYTXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBRFF1VlJQZDNiSzRrZDQra3JYeAp1RXAxMm1oK2RiMDZEUk9mRlM5OFhMWGhZbjBrVW1BRmM5ZW5CRy9rOEdLcDFWOGt5S0o4bzdCNWFabUxob0FTClN6REhNQVg1MmU2ZDVjYmxXaDUzQmRaZ2d0Sk5XM3laTGRQcmhwZ2FETEViTm12azVFSHk1cmtSZzNWQlJQVW8Kbi96N2hGVGNSY21zT1VCTDlzL3FWVEFINXoxdkpkR2djSUgvZ2FCSUd2Y2FDNXdtZEF4bUJkOFRVQlZiT1duQgpiQzdqMENjcUVkUlpTWTJZUjdlT1paMFlTL3R6SDhmNDFZSElpYmlUNzVzU093R3dEQkxROStYbC9WSms5YjdFCkVkeEo4RHdaQXFZQ2RYU3FyUm5FMnFpRjhFMUZUekZ3ajJQR2pva3FhbU9PendxZ0tESTUwbHhLN2F3QkxiTFgKcm9rPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
server: https://51.12.88.100
name: minikube-cluster
contexts:
- context:
cluster: minikube-cluster
user: minikube-cluster
name: current
current-context: current
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.