-
Notifications
You must be signed in to change notification settings - Fork 220
docs: standardize CLI examples and correct linkerd-cni namespace references #2082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bezarsnba
wants to merge
36
commits into
linkerd:main
Choose a base branch
from
bezarsnba:standardize-block-code
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
8bfe2cf
Standardize code blocks by removing leading '$' from command examples
bezarsnba 36f176a
fix namespace name of linkerd-cni
bezarsnba 37bdbd4
remove ~ on comment block
bezarsnba 6601e95
Merge branch 'main' into standardize-block-code
bezarsnba d3f44f8
Merge branch 'main' into standardize-block-code
bezarsnba 32490a5
Merge branch 'main' into standardize-block-code
bezarsnba 5b85d89
Merge branch 'main' into standardize-block-code
bezarsnba 38f6d7a
Update linkerd.io/content/2-edge/reference/iptables.md
bezarsnba 679e4bd
Update linkerd.io/content/2-edge/tasks/managing-egress-traffic.md
bezarsnba c7a1dc8
Update linkerd.io/content/2-edge/tasks/multicluster-using-statefulset…
bezarsnba 0e2ad0b
adjust block with multi-command 2.10 to 2.12
bezarsnba 9585281
revision troubleshooting files and others
bezarsnba 799dd23
revision files retricting-access
bezarsnba 970d2ce
revision _index.md
bezarsnba 90bdda4
Apply suggestion from @kflynn
bezarsnba 958f5f3
Apply suggestion from @kflynn
bezarsnba 2675fc2
revision files edge2
bezarsnba 43d883c
revison multicluster security, troubleshot and others
bezarsnba d8314a2
revision configurion dynamic troubleshoot and others
bezarsnba 394b88f
revision files
bezarsnba 5de2a73
fix comment lines
bezarsnba 6d336d1
revision blog session
bezarsnba c034ec2
revert somes files and revision others
bezarsnba cd2f3be
revision others files
bezarsnba 1b2565c
others revisions and reverts
bezarsnba 90f7e61
fix somes files
bezarsnba bb76891
typo
bezarsnba 4d8987c
Update linkerd.io/content/2.13/tasks/multicluster-using-statefulsets.md
bezarsnba 46dfe3b
fix upgrade page
bezarsnba cadd025
revert page upgrade 2.15 and 2.16
bezarsnba f8bd8a1
Merge branch 'main' into standardize-block-code
bezarsnba 7267702
revert config because we working another PR
bezarsnba 000807a
update managing egress
bezarsnba 8f0d56c
revert
bezarsnba b1c5bac
remove white space
bezarsnba 2cf1b05
rever
bezarsnba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -48,8 +48,8 @@ The first step is to clone the demo repository on your local machine. | |
|
|
||
| ```sh | ||
| # clone example repository | ||
| $ git clone git@github.com:linkerd/l2d-k3d-statefulset.git | ||
| $ cd l2d-k3d-statefulset | ||
| git clone git@github.com:linkerd/l2d-k3d-statefulset.git | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block contains command-only examples; both commands can be executed sequentially. |
||
| cd l2d-k3d-statefulset | ||
| ``` | ||
|
|
||
| The second step consists of creating two `k3d` clusters named `east` and `west`, | ||
|
|
@@ -60,10 +60,10 @@ everything. | |
|
|
||
| ```sh | ||
| # create k3d clusters | ||
| $ ./create.sh | ||
| ./create.sh | ||
|
|
||
| # list the clusters | ||
| $ k3d cluster list | ||
| k3d cluster list | ||
| NAME SERVERS AGENTS LOADBALANCER | ||
| east 1/1 0/0 true | ||
| west 1/1 0/0 true | ||
|
|
@@ -77,10 +77,10 @@ controllers and links are generated for both clusters. | |
|
|
||
| ```sh | ||
| # Install Linkerd and multicluster, output to check should be a success | ||
| $ ./install.sh | ||
| ./install.sh | ||
|
|
||
| # Next, link the two clusters together | ||
| $ ./link.sh | ||
| ./link.sh | ||
| ``` | ||
|
|
||
| Perfect! If you've made it this far with no errors, then it's a good sign. In | ||
|
|
@@ -100,25 +100,25 @@ communication. First, we will deploy our pods and services: | |
|
|
||
| ```sh | ||
| # deploy services and mesh namespaces | ||
| $ ./deploy.sh | ||
| ./deploy.sh | ||
|
|
||
| # verify both clusters | ||
| # | ||
| # verify east | ||
| $ kubectl --context=k3d-east get pods | ||
| kubectl --context=k3d-east get pods | ||
| NAME READY STATUS RESTARTS AGE | ||
| curl-56dc7d945d-96r6p 2/2 Running 0 7s | ||
|
|
||
| # verify west has headless service | ||
| $ kubectl --context=k3d-west get services | ||
| kubectl --context=k3d-west get services | ||
| NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
| kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 10m | ||
| nginx-svc ClusterIP None <none> 80/TCP 8s | ||
|
|
||
| # verify west has statefulset | ||
| # | ||
| # this may take a while to come up | ||
| $ kubectl --context=k3d-west get pods | ||
| kubectl --context=k3d-west get pods | ||
| NAME READY STATUS RESTARTS AGE | ||
| nginx-set-0 2/2 Running 0 53s | ||
| nginx-set-1 2/2 Running 0 43s | ||
|
|
@@ -129,7 +129,7 @@ Before we go further, let's have a look at the endpoints object for the | |
| `nginx-svc`: | ||
|
|
||
| ```sh | ||
| $ kubectl --context=k3d-west get endpoints nginx-svc -o yaml | ||
| kubectl --context=k3d-west get endpoints nginx-svc -o yaml | ||
| ... | ||
| subsets: | ||
| - addresses: | ||
|
|
@@ -169,23 +169,23 @@ would get an answer back. We can test this out by applying the curl pod to the | |
| `west` cluster: | ||
|
|
||
| ```sh | ||
| $ kubectl --context=k3d-west apply -f east/curl.yml | ||
| $ kubectl --context=k3d-west get pods | ||
| kubectl --context=k3d-west apply -f east/curl.yml | ||
| kubectl --context=k3d-west get pods | ||
| NAME READY STATUS RESTARTS AGE | ||
| nginx-set-0 2/2 Running 0 5m8s | ||
| nginx-set-1 2/2 Running 0 4m58s | ||
| nginx-set-2 2/2 Running 0 4m51s | ||
| curl-56dc7d945d-s4n8j 0/2 PodInitializing 0 4s | ||
|
|
||
| $ kubectl --context=k3d-west exec -it curl-56dc7d945d-s4n8j -c curl -- sh | ||
| kubectl --context=k3d-west exec -it curl-56dc7d945d-s4n8j -c curl -- sh | ||
| /$ # prompt for curl pod | ||
| ``` | ||
|
|
||
| If we now curl one of these instances, we will get back a response. | ||
|
|
||
| ```sh | ||
| # exec'd on the pod | ||
| / $ curl nginx-set-0.nginx-svc.default.svc.west.cluster.local | ||
| / curl nginx-set-0.nginx-svc.default.svc.west.cluster.local | ||
|
bezarsnba marked this conversation as resolved.
Outdated
|
||
| "<!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
|
|
@@ -217,10 +217,10 @@ Now, let's do the same, but this time from the `east` cluster. We will first | |
| export the service. | ||
|
|
||
| ```sh | ||
| $ kubectl --context=k3d-west label service nginx-svc mirror.linkerd.io/exported="true" | ||
| kubectl --context=k3d-west label service nginx-svc mirror.linkerd.io/exported="true" | ||
| service/nginx-svc labeled | ||
|
|
||
| $ kubectl --context=k3d-east get services | ||
| kubectl --context=k3d-east get services | ||
| NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
| kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 20h | ||
| nginx-svc-west ClusterIP None <none> 80/TCP 29s | ||
|
|
@@ -234,7 +234,7 @@ endpoints for `nginx-svc-west` will have the same hostnames, but each hostname | |
| will point to one of the services we see above: | ||
|
|
||
| ```sh | ||
| $ kubectl --context=k3d-east get endpoints nginx-svc-k3d-west -o yaml | ||
| kubectl --context=k3d-east get endpoints nginx-svc-k3d-west -o yaml | ||
| subsets: | ||
| - addresses: | ||
| - hostname: nginx-set-0 | ||
|
|
@@ -250,17 +250,17 @@ cluster (`west`), will be mirrored as a clusterIP service. We will see in a | |
| second why this matters. | ||
|
|
||
| ```sh | ||
| $ kubectl --context=k3d-east get pods | ||
| kubectl --context=k3d-east get pods | ||
| NAME READY STATUS RESTARTS AGE | ||
| curl-56dc7d945d-96r6p 2/2 Running 0 23m | ||
|
|
||
| # exec and curl | ||
| $ kubectl --context=k3d-east exec curl-56dc7d945d-96r6p -it -c curl -- sh | ||
| kubectl --context=k3d-east exec curl-56dc7d945d-96r6p -it -c curl -- sh | ||
| # we want to curl the same hostname we see in the endpoints object above. | ||
| # however, the service and cluster domain will now be different, since we | ||
| # are in a different cluster. | ||
| # | ||
| / $ curl nginx-set-0.nginx-svc-k3d-west.default.svc.east.cluster.local | ||
| / curl nginx-set-0.nginx-svc-k3d-west.default.svc.east.cluster.local | ||
|
bezarsnba marked this conversation as resolved.
Outdated
|
||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
|
|
@@ -328,8 +328,8 @@ validation. | |
| To clean-up, you can remove both clusters entirely using the k3d CLI: | ||
|
|
||
| ```sh | ||
| $ k3d cluster delete east | ||
| k3d cluster delete east | ||
| cluster east deleted | ||
| $ k3d cluster delete west | ||
| k3d cluster delete west | ||
| cluster west deleted | ||
| ``` | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.