forked from kubernetes/minikube
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Santhosh Nagaraj S <[email protected]>
- Loading branch information
Showing
11 changed files
with
194 additions
and
1 deletion.
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
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
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
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,18 @@ | ||
--- | ||
# ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: headlamp-admin | ||
namespace: headlamp | ||
labels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: headlamp | ||
namespace: headlamp |
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,42 @@ | ||
--- | ||
# Deployment | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: headlamp | ||
namespace: headlamp | ||
labels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp | ||
spec: | ||
serviceAccountName: headlamp | ||
containers: | ||
- name: headlamp | ||
image: {{.CustomRegistries.Headlamp | default .ImageRepository | default .Registries.Headlamp }}{{.Images.Headlamp}} | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- "-in-cluster" | ||
- "-plugins-dir=/headlamp/plugins" | ||
ports: | ||
- name: http | ||
containerPort: 4466 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http |
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,6 @@ | ||
--- | ||
# Namespace | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: headlamp |
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,21 @@ | ||
--- | ||
# Service | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: headlamp | ||
namespace: headlamp | ||
labels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp | ||
kubernetes.io/minikube-addons-endpoint: headlamp | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp |
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,10 @@ | ||
--- | ||
# ServiceAccount | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: headlamp | ||
namespace: headlamp | ||
labels: | ||
app.kubernetes.io/name: headlamp | ||
app.kubernetes.io/instance: headlamp |
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
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
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,51 @@ | ||
--- | ||
title: "Using Headlamp Addon" | ||
linkTitle: "Headlamp" | ||
weight: 1 | ||
date: 2022-06-08 | ||
--- | ||
|
||
## Headlamp Addon | ||
|
||
[Headlamp](https://kinvolk.github.io/headlamp) is an easy-to-use and extensible Kubernetes web UI. | ||
|
||
### Enable Headlamp on minikube | ||
|
||
To enable this addon, simply run: | ||
```shell script | ||
minikube addons enable headlamp | ||
``` | ||
|
||
Once the addon is enabled, you can access the Headlamp's web UI using the following command. | ||
```shell script | ||
minikube service headlamp -n headlamp | ||
``` | ||
|
||
To authenticate in Headlamp, fetch the Authentication Token using the following command: | ||
|
||
```shell script | ||
export SECRET=$(kubectl get secrets --namespace headlamp -o custom-columns=":metadata.name" | grep "headlamp-token") | ||
kubectl get secret $SECRET --namespace headlamp --template=\{\{.data.token\}\} | base64 --decode | ||
``` | ||
|
||
Headlamp can display more detailed information when metrics-server is installed. To install it, run: | ||
|
||
```shell script | ||
minikube addons enable metrics-server | ||
``` | ||
|
||
### Testing installation | ||
|
||
```shell script | ||
kubectl get pods -n headlamp | ||
``` | ||
|
||
If everything went well, there should be no errors about Headlamp's installation in your Minikube cluster. | ||
|
||
### Disable headlamp | ||
|
||
To disable this addon, simply run: | ||
|
||
```shell script | ||
minikube addons disable headlamp | ||
``` |