Rancher rakenduse evitamine k8s klastrile: erinevus redaktsioonide vahel

Allikas: Imre kasutab arvutit
Mine navigeerimisribaleMine otsikasti
Resümee puudub
Resümee puudub
10. rida: 10. rida:
 
tookohaarvuti$ helm repo list
 
tookohaarvuti$ helm repo list
 
Error: no repositories to show
 
Error: no repositories to show
  +
</pre>
  +
  +
rancher helm repo lisamine
  +
  +
<pre>
  +
tookohaarvuti$ helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
  +
"rancher-latest" has been added to your repositories
  +
  +
tookohaarvuti$ helm repo list
  +
NAME URL
  +
rancher-latest https://releases.rancher.com/server-charts/latest
  +
</pre>
  +
  +
Seejärel moodustatakse namespace rancher rakendusele
  +
  +
<pre>
  +
tookohaarvuti$ kubectl create namespace cattle-system
  +
namespace/cattle-system created
  +
</pre>
  +
  +
Seejärel täiendatakse kubernetes api liidest (crd teema)
  +
  +
<pre>
  +
tookohaarvuti$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml
  +
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
  +
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
  +
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
  +
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
  +
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
  +
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created
  +
</pre>
  +
  +
Lisatakse veel üks help repo, tõenäoliselt cert-manager jaoks
  +
  +
<pre>
  +
tookohaarvuti$ helm repo add jetstack https://charts.jetstack.io
  +
"jetstack" has been added to your repositories
  +
</pre>
  +
  +
Uuendatakse helm repod
  +
  +
<pre>
  +
tookohaarvuti$ helm repo update
  +
Hang tight while we grab the latest from your chart repositories...
  +
...Successfully got an update from the "jetstack" chart repository
  +
...Successfully got an update from the "rancher-latest" chart repository
  +
Update Complete. ⎈Happy Helming!⎈
  +
</pre>
  +
  +
Seejärel paigaldatakse cert-manager tarkvara
  +
  +
<pre>
  +
tookohaarvuti$ helm install cert-manager jetstack/cert-manager \
  +
--namespace cert-manager \
  +
--create-namespace \
  +
--version v1.7.1
  +
  +
NAME: cert-manager
  +
LAST DEPLOYED: Sat Nov 26 00:36:24 2022
  +
NAMESPACE: cert-manager
  +
STATUS: deployed
  +
REVISION: 1
  +
TEST SUITE: None
  +
NOTES:
  +
cert-manager v1.7.1 has been deployed successfully!
  +
  +
In order to begin issuing certificates, you will need to set up a ClusterIssuer
  +
or Issuer resource (for example, by creating a 'letsencrypt-staging' issuer).
  +
  +
More information on the different types of issuers and how to configure them
  +
can be found in our documentation:
  +
  +
https://cert-manager.io/docs/configuration/
  +
  +
For information on how to configure cert-manager to automatically provision
  +
Certificates for Ingress resources, take a look at the `ingress-shim`
  +
documentation:
  +
  +
https://cert-manager.io/docs/usage/ingress/
  +
</pre>
  +
  +
Lõpuks paigaldatakse rancher tarkvara
  +
  +
<pre>
  +
tookohaarvuti$ helm install rancher rancher-latest/rancher \
  +
--namespace cattle-system \
  +
--set hostname=k3s-rnr-tartu.auul.pri.ee \
  +
--set replicas=1 \
  +
--set bootstrapPassword=parool
  +
  +
NAME: rancher
  +
LAST DEPLOYED: Sat Nov 26 00:40:38 2022
  +
NAMESPACE: cattle-system
  +
STATUS: deployed
  +
REVISION: 1
  +
TEST SUITE: None
  +
NOTES:
  +
Rancher Server has been installed.
  +
  +
NOTE: Rancher may take several minutes to fully initialize. Please standby while Certificates are being issued, Containers are started and the Ingress rule comes up.
  +
  +
Check out our docs at https://rancher.com/docs/
  +
  +
If you provided your own bootstrap password during installation, browse to https://k3s-rnr-tartu.auul.pri.ee to get started.
  +
  +
If this is the first time you installed Rancher, get started by running this command and clicking the URL it generates:
  +
  +
```
  +
echo https://k3s-rnr-tartu.auul.pri.ee/dashboard/?setup=$(kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}')
  +
```
  +
  +
To get just the bootstrap password on its own, run:
  +
  +
```
  +
kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{ "\n" }}'
  +
```
  +
  +
  +
Happy Containering!
 
</pre>
 
</pre>
   

Redaktsioon: 19. aprill 2023, kell 23:27

Sissejuhatus

Käesoleva punkti tegevused toimivad mitte eelmises punktis ettevalmistatud kubernetes node arvutis, aga töökohaarvutis. Rancher rakenduse paigaldamiseks esitatakse väga erinevaid variante, üks neist on paigaldada olemasolevasse tavalisse RKE2 tarkvara kubernetes klastrisse helm abil, https://docs.ranchermanager.rancher.io/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli → 'Install Rancher with Helm'.

Rancher rakenduse paigaldamine

Süsteemile teada olevate helm repode nimekirja küsimine

tookohaarvuti$ helm repo list
Error: no repositories to show

rancher helm repo lisamine

tookohaarvuti$ helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
"rancher-latest" has been added to your repositories
 
tookohaarvuti$ helm repo list
NAME            URL                                             
rancher-latest  https://releases.rancher.com/server-charts/latest

Seejärel moodustatakse namespace rancher rakendusele

tookohaarvuti$ kubectl create namespace cattle-system
namespace/cattle-system created

Seejärel täiendatakse kubernetes api liidest (crd teema)

tookohaarvuti$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created

Lisatakse veel üks help repo, tõenäoliselt cert-manager jaoks

tookohaarvuti$ helm repo add jetstack https://charts.jetstack.io
"jetstack" has been added to your repositories

Uuendatakse helm repod

tookohaarvuti$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "rancher-latest" chart repository
Update Complete. ⎈Happy Helming!⎈

Seejärel paigaldatakse cert-manager tarkvara

tookohaarvuti$ helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.7.1
 
NAME: cert-manager
LAST DEPLOYED: Sat Nov 26 00:36:24 2022
NAMESPACE: cert-manager
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
cert-manager v1.7.1 has been deployed successfully!
 
In order to begin issuing certificates, you will need to set up a ClusterIssuer
or Issuer resource (for example, by creating a 'letsencrypt-staging' issuer).
 
More information on the different types of issuers and how to configure them
can be found in our documentation:
 
https://cert-manager.io/docs/configuration/
 
For information on how to configure cert-manager to automatically provision
Certificates for Ingress resources, take a look at the `ingress-shim`
documentation:
 
https://cert-manager.io/docs/usage/ingress/

Lõpuks paigaldatakse rancher tarkvara

tookohaarvuti$ helm install rancher rancher-latest/rancher \
  --namespace cattle-system \
  --set hostname=k3s-rnr-tartu.auul.pri.ee \
  --set replicas=1 \
  --set bootstrapPassword=parool
 
NAME: rancher
LAST DEPLOYED: Sat Nov 26 00:40:38 2022
NAMESPACE: cattle-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Rancher Server has been installed.
 
NOTE: Rancher may take several minutes to fully initialize. Please standby while Certificates are being issued, Containers are started and the Ingress rule comes up.
 
Check out our docs at https://rancher.com/docs/
 
If you provided your own bootstrap password during installation, browse to https://k3s-rnr-tartu.auul.pri.ee to get started.
 
If this is the first time you installed Rancher, get started by running this command and clicking the URL it generates:
 
```
echo https://k3s-rnr-tartu.auul.pri.ee/dashboard/?setup=$(kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}')
```
 
To get just the bootstrap password on its own, run:
 
```
kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{ "\n" }}'
```
 
 
Happy Containering!

Rancher rakenduse kasutamine

TODO

Kasulikud lisamaterjalid

  • TODO