forked from kubernetes/kops
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start work on documenting authentication/security
In particular SSH Issue kubernetes#166 Issue kubernetes#263 Issue kubernetes#236
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Security Notes for Kubernetes | ||
|
||
## SSH Access | ||
|
||
SSH is allowed to the masters and the nodes, by default from anywhere. | ||
|
||
To change the CIDR allowed to access SSH (and HTTPS), set AdminAccess on the cluster spec. | ||
|
||
When using the default images, the SSH username will be `admin`, and the SSH private key is be | ||
the private key corresponding to the public key in `kops get secrets --type sshpublickey admin`. When | ||
creating a new cluster, the SSH public key can be specified with the `--ssh-public-key` option, and it | ||
defaults to `~/.ssh/id_rsa.pub`. | ||
|
||
To change the SSH public key on an existing cluster: | ||
|
||
* `kops delete secret --name <clustername> sshpublickey admin` | ||
* `kops create secret --name <clustername> sshpublickey admin -i ~/.ssh/newkey.pub` | ||
* `kops update cluster --yes` to reconfigure the auto-scaling groups | ||
* `kops rolling-update --yes` to immediately roll all the machines so they have the new key (optional) | ||
|
||
|
||
## Kubernetes API | ||
|
||
(this section is a work in progress) | ||
|
||
Kubernetes has a number of authentication mechanisms: | ||
|
||
### API Bearer Token | ||
|
||
The API bearer token is a secret named 'admin'. | ||
|
||
`kops get secrets admin -oplaintext` will show it | ||
|
||
### Admin Access | ||
|
||
Access to the administrative API is stored in a secret named 'kube': | ||
|
||
`kops get secrets kube -oplaintext` or `kubectl config view --minify` to reveal |